Compartilhar via


documentTimeToParentTime 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 document timeline to the corresponding point in the element's parent timeline.

Syntax

parentTime = object.documentTimeToParentTime(documentTime)

Parameters

documentTime Required. An Integer that specifies a point on the document's timeline.

Return Value

An Integer that specifies the point in the element's parent timeline that corresponds to documentTime.

Example

This example uses the documentTimeToParentTime method to retrieve the point in the element's parent timeline corresponding to documentTime. To see the element's point in the parent timeline, click the documentTimeToParentTime button.

<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>documentTimeToParentTime Method</TITLE>
<?IMPORT namespace="t" implementation="#default#time2">

<STYLE>
    .time{ behavior: url(#default#time2);}
</STYLE>
</HEAD>

<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF"
    LINK="#000000" VLINK="#808080" ALINK="#000000">

<B>Document timer:</B>
<SPAN id="Timer1" class="time" dur="1" repeatCount="indefinite"
    onrepeat="innerText=parseInt(t1.currTimeState.activeTime);">0</SPAN>
<BR>
<B>Time container timer:</B>
<SPAN id="Timer2" class="time" dur="1" repeatCount="indefinite"
    onrepeat="innerText=parseInt(t1.currTimeState.activeTime);">0</SPAN>

<BR>
<t:excl id="t1" class="time" repeatCount="3">
    <DIV id="div1" style="color:blue;font-size:0.5in" class="time"
        begin="2s" dur="5s">HELLO WORLD!</DIV>
</t:excl>

<BR>
<SPAN id="s1">Point in parent timeline:</span>

<BR><BR>
<BUTTON id="b1" class="time" dur="1" repeatCount="indefinite"
    onclick="s1.innerText='Point in parent timeline: ' +
        div1.documentTimeToParentTime(t1.currTimeState.activeTime);"
    onrepeat="innerText='Get documentTimeToParentTime'">
    Get documentTimeToParentTime
</BUTTON>

</BODY>
</HTML>

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/documentTimeToParentTime.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, parentTimeBegin, parentTimeEnd