REPEATCOUNT Attribute | repeatCount Property

Internet Development Index

Sets or retrieves the number of times an element's timeline repeats.

What's New for Microsoft?Internet Explorer 6

The begin repeatCount applies to the transitionFilter.

Syntax

HTML<ELEMENT REPEATCOUNT = vRepetitions... >
Scriptingobject.repeatCount(time) [ = vRepetitions ]

Possible Values

vRepetitionsVariant that specifies or receives one of the following values.
indefiniteTimeline repeats indefinitely.
repetitionsFloating-point number or integer greater than 0 that specifies how many times the timeline repeats.
1Default. Timeline runs only once.

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

Remarks

This property supersedes the repeat property exposed by the time behavior.

If the repeatCount property is a floating-point number, the element's timeline multiplies the fractional amount by the simple duration (simpleDur) on the last iteration. For example, a t:SEQ with a simpleDur of 10 seconds and a repeatCount of 2.5 would result in a sequence that plays for a total of 25 seconds. In this case, the sequence completes two full iterations, and the last iteration ends after playing for 5 seconds (10 seconds x .5).

The current iteration of a repeat loop can be obtained on an active timeline using the repeatCount property exposed by the currTimeState object.

Examples

The following example shows how to repeat a parallel timeline container using the REPEATCOUNT attribute.

<HTML>
<HEAD>
<TITLE>repeatCount Property</TITLE>
<STYLE>
.time{ behavior: url(#default#time2);}
</STYLE>
</HEAD>
<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF" LINK="#000000"
VLINK="#808080" ALINK="#000000">
<P>Three paragraphs will be shown for three seconds each, and
the entire process will be repeated three times.
<SPAN ID="parent" CLASS=time BEGIN="0" DUR="9" TIMECONTAINER="PAR"
REPEATCOUNT="3" TIMEACTION="display">
<SPAN ID="span1" CLASS=time STYLE="COLOR:Red;" BEGIN="0"
DUR="3" TIMEACTION="visibility">
<H3>Paragraph 1</H3>
<P>This is paragraph number one.</P>
</SPAN>
<SPAN ID="span2" CLASS=time STYLE="COLOR:Blue;" BEGIN="3"
DUR="3" TIMEACTION="visibility">
<H3>Paragraph 2</H3>
<P>This is paragraph number two.</P>
</SPAN>
<SPAN ID="span2" CLASS=time STYLE="COLOR:Green;" BEGIN="6"
DUR="3" TIMEACTION="visibility">
<H3>Paragraph 3</H3>
<P>This is paragraph number three.</P>
</SPAN>
</SPAN>
</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.

The example below uses the REPEATCOUNT attribute to repeat a transition on a DIV. The REPEATCOUNT attribute inside the t:TRANSITIONFILTER element is set to indefinite. However, the DIV below will only repeat for the duration of the DIV (in this case seven seconds).

<HTML XMLNS:t = "urn:schemas-microsoft-com:time">
<HEAD>
<STYLE>
.time    {behavior: url(#default#time2);}
</STYLE>
<?import namespace = t urn = "urn:schemas-microsoft-com:time"
implementation = "#default#time2" />
</HEAD>
<BODY>
<t:TRANSITIONFILTER REPEATCOUNT="indefinite" TYPE="barnDoorWipe" DUR="3"
TARGETELEMENT="oDiv1"/>
<!-- The REPEATCOUNT property inside the transitionFilter is set to
indefinite. However, the DIV below will only repeat for the duration
of the DIV (in this case seven seconds).
-->
<DIV CLASS="time" ID="oDiv1" dur="7"  style="position:relative; left:20px;
width:420px; height:100px; background-image:url(ART_time_progress.gif);
background-repeat: no-repeat;">
</DIV>
</BODY>
</HTML>
This feature requires Microsoft?Internet Explorer 6 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

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

Applies To

t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION, t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, t:PAR, t:REF, t:SEQ, time2, t:VIDEO, t:TRANSITIONFILTER

See Also

Introduction to HTML+TIME, repeatDur