|
October 13, 2000 Deriving HTML+TIME's Active Duration Tips: October 2000
Yehuda Shiran, Ph.D.
|
|
The HTML+TIME capability in IE 5.5 and up is based on the timeline principle. Some applications require that you know the total duration. You do it by using the currTimeState object, which is a property of any container that participates in the HTML+TIME behavior. One of currTimeState's many properties and methods is the activeDur property. The activeDur property reports the total length of the timeline. This property includes the repeatDur time, and the effect of the autoReverse property, if applicable. For example, a timeline with a duration of five seconds, a repeatCount of 3, and autoReverse set to true would yield an activeDur of 30 seconds (2*(5*3)). A timeline with a repeatCount of indefinite would yield an Infinity activeDur. The following example (based on a Microsoft script) demonstrates the usage of activeDur. When you click the button, we print the active duration, which is infinite in this example. Here is the function that prints the active duration of the timeline:
And here is the Demo:
Heading 1Heading 2Heading 3Heading 4Heading 5Heading 6
Learn more about HTML+TIME in Column 67, Introduction to HTML+TIME.
People who read this tip also read these tips: Look for similar tips by subject: |