pauseElement Method

Internet Development Index

Stops playing an element's timeline at the current point.

Syntax

object.pauseElement()

Return Value

No return value.

Remarks

This method supersedes the pause method.

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>&nbsp;&nbsp;
<BUTTON ID="resumeBtn" DISABLED="true" onclick="doResume();">
Resume</BUTTON>&nbsp;&nbsp;
</BODY>
</HTML>
This feature requires Microsoft?Internet Explorer 5.5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

This method is defined in Synchronized Multimedia Integration Language (SMIL) 2.0 Non-Microsoft link.

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

resumeElement, Introduction to HTML+TIME