RESTART Attribute | restart Property

This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.

Sets or gets the conditions under which an element can be restarted on a timeline.

Syntax

HTML <ELEMENT RESTART = sAction... >
Scripting [ sAction = ] object.restart [ = sAction ]

Possible Values

sAction String that specifies or receives one of the following values.
always
Default. Element can be restarted at any time.
never
Element cannot be restarted for the remaining duration of the parent time container.
whenNotActive
Element can be restarted only when it is not active on the timeline.

The property is read/write. The property has a default value of always.

Remarks

This property supersedes the eventRestart property.

Example

This example demonstrates each of the three values (always, never, whenNotActive) for the restart property. These values specify the conditions in which an element can be restarted on a timeline.

<HTML XMLNS:t="urn:schemas-microsoft-com:time">
<HEAD>
<?IMPORT namespace="t" implementation="#default#time2">

<STYLE>
    .time{ behavior: url(#default#time2);}
</STYLE>
</HEAD>

<BODY>

<t:par id="tp1" begin="indefinite" dur="20">
    <DIV id="div1" class="time"
        style="position:absolute;top:255px;left:35px;width:100px;height:100px;
        background-color:yellow; font-size:large; text-align:center;"
        end="6" restart="never">DIV1<BR>'never'
    </DIV>
    <DIV id="div2" class="time"
        style="position:absolute;top:255px;left:145px;width:100px;height:100px;
        background-color:blue; font-size:large; text-align:center;"
        begin="2" end="8" restart="always">DIV2<BR>'always'
    </DIV>
    <DIV id="div3" class="time"
        style="position:absolute;top:255px;left:255px;width:100px;height:100px;
        background-color:green; font-size:large; text-align:center;"
        begin="4" end="10" restart="whenNotActive">DIV3<BR>'whenNotActive'
    </DIV>
</t:par>

<P style="position:absolute; top:370px; left:45px;">
<BUTTON id="b0" onclick="tp1.beginElement();"
    style="font-weight:bold;">Start</BUTTON>
<BUTTON id="b1" onclick="tp1.endElement();">Stop</BUTTON>&nbsp;&nbsp;
<BUTTON id="b2" onclick="div1.beginElement();alert('DIV1 cannot be restarted for the remaining duration of the parent time container (20 seconds).');">Restart DIV1</BUTTON>
<BUTTON id="b3" onclick="div2.beginElement();">Restart DIV2</BUTTON>
<BUTTON id="b4" onclick="div3.beginElement();">Restart DIV3</BUTTON>
</P>
</BODY>
</HTML>

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

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

Introduction to HTML+TIME