repeatCount property

Sets or gets the number of times an element timeline repeats.

Syntax

JScript
time = object.repeatCount

 

Property values

Type: Variant

One of the values in the Property Values section.

Remarks

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

If the repeatCount property is a floating-point number, the element 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 results 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 0.5).

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

In Microsoft Internet Explorer 6, the begin repeatCount applies to the transitionFilter.

Examples

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

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

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

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

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/htmltime/transitions/ovwRepeatCount1.html

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

See also

animate

animateColor

animateMotion

animation

audio

img

media

par

ref

seq

time2

video

transitionFilter

Reference

repeatDur

Conceptual

Introduction to HTML+TIME