direction Attribute | Direction

HTML (DHTML)

direction Attribute | Direction Property

Internet Development Index

Sets or retrieves the direction that the filter's effect is offset.

Syntax

HTML
{ filter:progid:DXImageTransform.Microsoft.filter-name(
    direction = iOffset ... ) ... }
Scripting
object.filters.item(
    "DXImageTransform.Microsoft.filter-name").Direction [ = iOffset ]

Possible Values

iOffsetInteger that specifies or receives the direction of the offset, in degrees. This can be one of the following values.
0Top
45Top right
90Right
135Bottom right
180Bottom
225Bottom left
270Default. Left
315Top left

The property is read/write. The property has a default value of 270 for all objects with the exception of Shadow which has a default value of 225.

Remarks

Values less than 0 or greater than 360 automatically convert to values between 0 and 360. For example, a value of -45 degrees is equivalent to a value of 315 degrees.

Example

This example sets the Direction and Strength properties of the MotionBlur filter for an image, with an initial strength of 1. When the page loads, the onfilterchange event of the image fires. The onfilterchange event fires each time the Strength and Direction properties change, until Strength reaches a value of 100.

<SCRIPT>
function HandleChange()
{
with (window.event.srcElement.filters[0])
{
if (strength < 100)
{
strength += 1;
direction += 45;
}
}
}</SCRIPT>
<IMG ID="img1" SRC="solarsys.gif" onfilterchange="HandleChange()"
STYLE="filter:progid:DXImageTransform.Microsoft.MotionBlur(
STRENGTH=1, DIRECTION=0)" />
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Applies To

MotionBlur, Shadow