restart property

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

Syntax

JScript
action = object.restart

 

Property values

Type: String

One of the values in the Property Values section.

Remarks

This property supersedes the eventRestart property.

Examples

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.

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

<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>

See also

transitionFilter

animate

animateColor

animateMotion

animation

audio

img

media

par

ref

seq

set

time2

video

Introduction to HTML+TIME