resumeElement Method | Internet Development Index |
Restarts the element's timeline from a paused state.
Syntax
object.resumeElement()
Return Value
No return value.
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.
Example
The following example shows how to pause and resume a timeline using the pauseElement and resumeElement methods.
<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> <BUTTON ID="resumeBtn" DISABLED="true" onclick="doResume();">Resume</BUTTON> </BODY> </HTML>
Standards Information
This method is defined in Synchronized Multimedia Integration Language (SMIL) 2.0 .
Applies To
t:TRANSITIONFILTER, t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION, t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, t:PAR, t:REF, t:SEQ, t:SET, time2, t:VIDEO
See Also
pauseElement, Introduction to HTML+TIME