onrepeat Event
This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.
Fires when the timeline repeats on an element, beginning with the second iteration.
Syntax
Inline HTML <ELEMENT onrepeat = "handler(event);" > Event Property object.onrepeat = handler; attachEvent object.attachEvent( "onrepeat", handler); Named script < SCRIPT FOR
= objectEVENT
= onrepeat>
Event Information
Bubbles No Cancels No To invoke Set the repeatCount property to a value greater than 1. Default action Calls the associated event handler.
Event Object Properties
Although event handlers in the DHTML Object Model do not receive parameters directly, a handler can query the event object for the following event properties.
Available Properties
srcElement Gets or sets the object that fired the event. type Gets or sets the event name from the event object. Refer to the specific event object for additional event properties.
Remarks
The event fires once for each repetition of the timeline, excluding the first full cycle. Therefore, the onrepeat event fires repeatCount–1 times unless it is stopped by other dependencies before completion. This event fires only if the repeatCount or repeatDur property is set directly on the element. This event does not fire on child elements that have the repeatCount or repeatDur property set only on their parent elements.
Example
This example displays a message box that indicates the current repeat iteration every time the onrepeat event fires on a timeline.
<HTML> <HEAD> <STYLE> .time {behavior: url(#default#time2);} </STYLE> </HEAD> <BODY BGCOLOR="white"> <SPAN ID="parent1" CLASS=time BEGIN="0" DUR="6" REPEATCOUNT="4" TIMELINE="par" TIMEACTION="display" onrepeat="alert('Current iteration: ' + parent1.currTimeState.repeatCount);"> <SPAN CLASS=time BEGIN="0" DUR="2">This text will be displayed for two seconds.</SPAN><BR> <SPAN CLASS=time BEGIN="3" DUR="4">This text will be displayed for four seconds.</SPAN> </SPAN> <SPAN CLASS="time" BEGIN="parent1.end">The End.</SPAN> </BODY> </HTML>
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/onrepeat.htm
Applies To
t:TRANSITIONFILTER, t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION, t:ANIMATION, t:AUDIO, t:EXCL, t:IMG, t:MEDIA, t:PAR, t:REF, t:SEQ, t:SET, time2, t:VIDEO
See Also