Поделиться через


resumeElement method

Restarts the element's timeline from a paused state.

Syntax

*object.*resumeElement()

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 supersedes the resume method.

If an element is not paused and the resumeElement method is called, the element's timeline will not be affected.

Examples

The following example shows how to pause and resume a timeline using the pauseElement and resumeElement methods.

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

<HTML>
<HEAD>
<TITLE>Pause and Resume</TITLE>
<?IMPORT namespace="t" implementation="#default#time2">
<STYLE>
    .time{ behavior: url(#default#time2); }
    .hiliteText{ color:#483D8B;
        font-weight:bold;}
</STYLE>
<SCRIPT>
function doResume(){
    oParent.resumeElement();
    pauseBtn.disabled = false;
    resumeBtn.disabled = true;
}
function doPause(){
    oParent.pauseElement();
    pauseBtn.disabled = true;
    resumeBtn.disabled = false;
}
</SCRIPT>
</HEAD>

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

<TABLE ID="oParent" BORDER="1" CLASS="time" DUR="8s" REPEATCOUNT="indefinite"
    TIMECONTAINER="SEQ" TIMEACTION="none">
<TBODY>
    <TR>
        <TH WIDTH="120">Item</TH>
        <TH WIDTH="50">Code</TH>
        <TH WIDTH="40">Qty.</TH>
    </TR>
    <TR CLASS="time" TIMEACTION="class:hiliteText" DUR="2s">
        <TD>Apples</TD>
        <TD>A1</TD>
        <TD>7</TD>
    </TR>
    <TR CLASS="time" TIMEACTION="class:hiliteText" DUR="2s">
        <TD>Bananas</TD>
        <TD>B2</TD>
        <TD>23</TD>
    </TR> 
    <TR CLASS="time" TIMEACTION="class:hiliteText" DUR="2s">
        <TD>Oranges</TD>
        <TD>O3</TD>
        <TD>12</TD>
    </TR>
    <TR CLASS="time" TIMEACTION="class:hiliteText" DUR="2s">
        <TD>Strawberries</TD>
        <TD>S4</TD>
        <TD>31</TD>
    </TR>
</TBODY>
</TABLE>
<BR>
<BUTTON ID="pauseBtn" onclick="doPause();">Pause</BUTTON>&nbsp;&nbsp;
<BUTTON ID="resumeBtn" DISABLED="true" onclick="doResume();">Resume</BUTTON>&nbsp;&nbsp;
</BODY>
</HTML>

See also

transitionFilter

animate

animateColor

animateMotion

animation

audio

img

media

par

ref

seq

set

time2

video

Reference

pauseElement

Conceptual

Introduction to HTML+TIME