Compartir a través de


beginElement method

Starts the element on the timeline.

Syntax

*object.*beginElement()

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 as if the element's begin time is reached on the local timeline. When the beginElement method is called, the element begins. All time child elements are notified and aligned correctly to the local timeline.

Examples

This example displays an image when the countdown reaches 0. Click the Restart Timeline button to restart the timeline with the beginElement method.

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

<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<STYLE>
    .time{ behavior: url(#default#time2);}
</STYLE>
<?IMPORT namespace="t" implementation="#default#time">
</HEAD>
<BODY BGCOLOR="white">
<t:SEQ ID="sequence" CLASS="time">
    <SPAN CLASS="time" STYLE="Color:Red; font-size:20pt;" 
        TIMEACTION="display" DUR="1">5...
    </SPAN>
    <SPAN CLASS="time" STYLE="Color:Green; font-size:20pt;" 
        TIMEACTION="display" DUR="1">4...
    </SPAN>
    <SPAN CLASS="time" STYLE="Color:Blue; font-size:20pt;" 
        TIMEACTION="display" DUR="1">3...
    </SPAN>
    <SPAN CLASS="time" STYLE="Color:Orange; font-size:20pt;" 
        TIMEACTION="display" DUR="1">2...
    </SPAN>
    <SPAN CLASS="time" STYLE="Color:Purple; font-size:20pt;" 
        TIMEACTION="display" DUR="1">1...
    </SPAN><BR>
    <IMG CLASS="time" DUR="indefinite" 
    SRC="/workshop/graphics/sun.gif"/>
</t:SEQ><BR>
<BUTTON ID="btn" onclick="sequence.beginElement();">
    Restart Timeline
</BUTTON>
<BR><BR>
</BODY>
</HTML>

See also

transitionFilter

animate

animateColor

animateMotion

animation

audio

excl

img

media

par

ref

seq

set

time2

video

Reference

beginElementAt

endElement

Conceptual

Introduction to HTML+TIME