endElement method

Stops the element on the timeline.

Syntax

*object.*endElement()

Parameters

This method has no parameters.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

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.

Examples

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

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

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

See also

transitionFilter

animate

animateColor

animateMotion

animation

audio

excl

img

media

par

ref

seq

set

time2

video

Reference

beginElement

endElementAt

Conceptual

Introduction to HTML+TIME