BY Attribute | by Property

Internet Development Index

Specifies a relative offset value for the progress of the transitionFilter.

Syntax

HTML<t:TRANSITIONFILTER BY = sBy... >
Scriptingt:TRANSITIONFILTER.by(val) [ = sBy ]

Possible Values

sByString that specifies or receives the relative offset value for the progress of the transitionFilter. Legal values are real numbers in the range 0-1.

The property is read/write. The property has no default value.

Remarks

The by attribute specifies the relative offset value of the progress from the value of the from attribute. For example, if from has a value of 0.2 and by has a value of 0.5, then the transition will start at a progress of 0.2 and end at a progress of 0.7. In contrast, if the from attribute is set to a value of 0.2 and the to attribute is set to a value of 0.5, then the transition will start at a progress of 0.2 and end at a progress of 0.5.

The by property cannot be used on the same transitionFilter element as the to property. If both properties are specified, the by value is ignored.

The value specified for the by property is ignored if the values attribute is specified.

When writing script to dynamically change the properties of an active animation, developers should consider a couple of issues. Because results might be unpredictable or undefined when you change the properties of an active animation, restart the animation with beginElement after you have made the change. For example:

<SCRIPT>
object.endElement();
object.by='0.4';
object.beginElement();
</SCRIPT>

For the animate, animateMotion, and animateColor objects, the time2 behavior uses the following model to evaluate which properties to animate.

Example

This example shows how to use the by property to stop a transition part way through the transition.

<HTML XMLNS:t = "urn:schemas-microsoft-com:time">
<HEAD>
<STYLE>
.time{behavior: url(#default#time2);}
</STYLE>
<?import namespace = t urn = "urn:schemas-microsoft-com:time"
implementation = "#default#time2" />
</HEAD>
<BODY>
<t:TRANSITIONFILTER FROM="0.3" BY="0.4" TYPE="barWipe" DUR="3"
TARGETELEMENT="oDiv1" />
<DIV CLASS="time" ID="oDiv1" DUR="indefinite"
STYLE="position:relative; left:20px; width:420px; height:100px;
background-image:url(ART_time_progress.gif); background-repeat: no-repeat;">
</DIV>
</BODY>
</HTML>
This feature requires Microsoft?Internet Explorer 6 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Applies To

t:TRANSITIONFILTER

See Also

Introduction to HTML+TIME, Using HTML+TIME Transitions