activeTimeToParentTime Method
This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.
Converts a value in the element's active timeline to the corresponding point in the parent timeline.
Syntax
parentTime = object.activeTimeToParentTime(activeTime)
Parameters
activeTime Required. An Integer that specifies a point on the element's active timeline. Legal values range from 0
to activeDur.
Return Value
An Integer that specifies the point in the parent timeline that corresponds to activeTime.
Example
This example uses the activeTimeToParentTime method to compare the value of the element's active timeline to the corresponding point in the parent timeline. To see each element's point in the parent timeline, click the element's activeTimeToParentTime button.
<HTML XMLNS:t="urn:schemas-microsoft-com:time"> <HEAD> <TITLE>activeTimeToParentTime Method</TITLE> <?IMPORT namespace="t" implementation="#default#time2"> <STYLE> .time{behavior: url(#default#time2);} </STYLE> </HEAD> <BODY ID="b1" TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF" LINK="#000000" VLINK="#808080" ALINK="#000000"> <B>Time container timer:</B> <SPAN class="time" dur="1" repeatCount="indefinite" onrepeat="innerText=parseInt(t1.currTimeState.activeTime);">0</SPAN> <BR> <t:excl id="t1" class="time" dur="10s" autoReverse="true"> <DIV id="div1" style="color:blue" class="time" begin="1s" dur="3s" timeAction="visibility">First Line</DIV> <DIV id="div2" style="color:green" class="time" begin="4s" dur="3s" timeAction="visibility">Second Line</DIV> <DIV id="div3" style="color:red" class="time" begin="7s" dur="3s" timeAction="visibility">Third Line</DIV> </t:excl> <BR> <BUTTON class="time" dur="1" repeatCount="indefinite" onclick="alert('Point in parent timeline: ' + div1.activeTimeToParentTime(t1.currTimeState.activeTime));" onrepeat="innerText='First line\'s activeTimeToParentTime at ' + parseInt(t1.currTimeState.activeTime) + ' seconds';"> First line's activeTimeToParentTime at 0 seconds </BUTTON> <BR> <BUTTON class="time" dur="1" repeatCount="indefinite" onclick="alert('Point in parent timeline: ' + div2.activeTimeToParentTime(t1.currTimeState.activeTime));" onrepeat="innerText='Second line\'s activeTimeToParentTime at ' + parseInt(t1.currTimeState.activeTime) + ' seconds';"> Second line's activeTimeToParentTime at 0 seconds </BUTTON> <BR> <BUTTON class="time" dur="1" repeatCount="indefinite" onclick="alert('Point in parent timeline: ' + div3.activeTimeToParentTime(t1.currTimeState.activeTime));" onrepeat="innerText='Third line\'s activeTimeToParentTime at ' + parseInt(t1.currTimeState.activeTime) + ' seconds';"> Third line's activeTimeToParentTime at 0 seconds </BUTTON> </BODY> </HTML>
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/activeTimeToParentTime.htm
Applies To
t:TRANSITIONFILTER, t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION, t:ANIMATION, t:AUDIO, t:EXCL, t:IMG, t:MEDIA, t:PAR, t:REF, t:SEQ, t:SET, time2, t:VIDEO
See Also
Introduction to HTML+TIME, activeTime, parentTimeBegin, parentTimeEnd