parentTimeToDocumentTime method

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

Syntax

object.parentTimeToDocumentTime(parentTime)

Parameters

  • parentTime [in]
    Type: double

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

Return value

Type: Integer

An Integer that specifies the point in the document timeline that corresponds to parentTime.

Examples

This example uses the parentTimeToDocumentTime method to retrieve the value of the point in the document timeline corresponding to parentTime. To see the element's point in the document timeline, click the element's parentTimeToDocumentTime button.

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

<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>parentTimeToDocumentTime 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">

<!-- Time Element, t:par, to be tested -->
<t:par id="t1" class="time" repeatCount="3">
    <DIV id="div1" class="time" begin="2s" dur="2s"
        style="color:blue;font-size:0.5in">Hello World</DIV>
</t:par>

<SPAN id="s1" style="position:relative;top:20px;">
    parentTimeToDocumentTime:</SPAN>
<BR>

<!-- Time Method, parentTimeToDocumentTime(), to be tested -->
<!-- Values should be 3,7,& 11 depending on the time in which the button is clicked.-->
<BUTTON id="b1" onclick="s1.innerText='parentTimeToDocumentTime: ' +
    div1.parentTimeToDocumentTime(3);">Get parentTimeToDocumentTime(3)</BUTTON>
</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