Compartir a través de


documentTimeToParentTime method

Converts a value in the document timeline to the corresponding point in the element's parent timeline.

Syntax

*object.*documentTimeToParentTime(documentTime)

Parameters

  • documentTime [in]
    Type: double

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

Return value

Type: Integer

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

Examples

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.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/documentTimeToParentTime.htm

<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>

See also

transitionFilter

animate

animateColor

animateMotion

animation

audio

excl

img

media

par

ref

seq

set

time2

video

Reference

parentTimeBegin

parentTimeEnd

Conceptual

Introduction to HTML+TIME