TO Attribute | to Property (t:TRANSITIONFILTER) (Internet Explorer - HTML+Time 2)

HTML (DHTML)

TO Attribute | to Property

Internet Development Index

Sets or retrieves a value that indicates the point in the transition's progress at which the transition ends.

Syntax

HTML<t:TRANSITIONFILTER TO = sTo... >
Scriptingt:TRANSITIONFILTER.to(val) [ = sTo ]

Possible Values

sToString that specifies or receives the ending progress value of the transition. Legal values are real numbers in the range 0.0-1.0.
1.0Default. End transition at the end of the transition progress.

The property is read/write. The property has a default value of 1.0.

Remarks

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

The transition can transition in or out depending on how the to and from properties are set. For example, if the from property had a value of 1.0 and the to property had a value of 0.0, the transition would appear to transition out. However, to set the transition to go out, you would typically use the mode property.

The value specified for the to 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.to='0.8';
object.beginElement();
</SCRIPT>

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

  • The values property, if specified, overrides any setting for the from, to, or by properties.
  • The from property is used unless the values or path properties are specified.
  • The to property, if specified, overrides any setting for the by property.
  • The by property doesn't override any properties.

Example

This example shows how to use the to 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" TO="0.7"  TYPE="barWipe" DUR="3"
TARGETELEMENT="oDiv1" />
<DIV CLASS="time" ID="oDiv1" DUR="9"  STYLE=" font:bold x-large fantasy;
width:400px; height:100px; background:#CC3333;color:#FFFFFF;">
<SPAN STYLE="position:relative; top:20px;margin:160;">TRANSITION!</SPAN>
</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