activeTime Property

This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.

Gets the current point in time along the total active timeline, including repeats and time spent in reverse mode.


[ iTime = ] currTimeState.activeTime

Possible Values

iTime Integer that receives the current point in time along the timeline, in seconds. The value of this property ranges from 0 to activeDur.

The property is read-only. The property has no default value.


This property supersedes the currTime property.

The activeTime property contains the time that has elapsed since the timeline for the object began, including time spent repeating and in reverse mode. Run the following example to see how activeTime accumulates throughout the duration of the timeline.


This example shows how activeTime, segmentTime, and simpleTime relate to each other.

<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<TITLE>autoReverse Example</TITLE>

    .time{behavior: url(#default#time2);}
<?IMPORT namespace="t" implementation="#default#time2">

window.onload = fnOnLoad;

function fnOnLoad()
    // Set up a timer to watch the time values.
    window.setInterval(fnUpdateTimes, 100);

function fnUpdateTimes()
    oSimpleTime.innerHTML = "&nbsp;simpleTime:&nbsp;" +
    oSegmentTime.innerHTML = "segmentTime:&nbsp;" +
    oActiveTime.innerHTML = "&nbsp;activeTime:&nbsp;" +

function fnRepeat()
    oRepeatCount.innerHTML = "repeatCount:&nbsp;" +
        (oAnim.currTimeState.repeatCount + 1);
        // Add one because repeatCount is zero-based.
<DIV STYLE="font-family:courier;">
<DIV ID="oRepeatCount">repeatCount: 1</DIV>
<DIV ID="oSimpleTime">&nbsp;simpleTime:&nbsp;0</DIV>
<DIV ID="oSegmentTime">segmentTime:&nbsp;0</DIV>
<DIV ID="oActiveTime">&nbsp;activeTime:&nbsp;0</DIV>

<DIV ID="oDiv" CLASS="time" STYLE="position:absolute; left:50px; 
top:250px; width:100px; height:100px; background-color:blue;"></DIV>

<t:ANIMATEMOTION ID="oAnim" targetElement="oDIV" to="340,40" dur="2" 
autoReverse="true" repeatCount="5" onrepeat="fnRepeat()" fill="freeze"/>


Code example:

Applies To


See Also

Community Additions