Compartilhar via


endElement Method

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

Stops the element on the timeline.

Syntax

object.endElement()

Return Value

No return value.

Remarks

This method applies the same action that would occur if the element's end time was reached on the local timeline, or if the element's duration ( dur) expired. All timed child elements are notified and aligned correctly to the local timeline. The endElement method fires the onend event.

Example

This example shows how to end a timeline using the endElement method.

<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>endElement Method</TITLE>
<STYLE>
    .time { behavior: url(#default#time2) }
</STYLE>

<?IMPORT namespace="t" implementation="#default#time2">
</HEAD>

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

<B>Timer:</B>
<span id="Timer" class="time" dur=".01"  repeatCount="indefinite" fill="hold"        
    onrepeat="innerText=parseInt(t1.currTimeState.activeTime);">0</span>
<BR><BR>

<t:excl ID="t1" repeatDur="indefinite"> 
    <DIV ID="div1" CLASS="time" BEGIN="0" DUR="3">First line displayed for 3  
        seconds.</DIV>
    <DIV ID="div2" CLASS="time" BEGIN="3" DUR="3">Second line displayed for 3 
        seconds.</DIV>
</t:excl>

<BR>
<BUTTON id="b1" onclick="t1.endElement()">End Timeline!</BUTTON>

</BODY>
</HTML>

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

beginElement, endElementAt, Introduction to HTML+TIME