Κοινή χρήση μέσω


REPEATCOUNT Attribute | repeatCount Property

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

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

Syntax

HTML <ELEMENT REPEATCOUNT = vRepetitions... >
Scripting [ vRepetitions = ] object.repeatCount [ = vRepetitions ]

Possible Values

vRepetitions Variant that specifies or receives one of the following values.
indefinite
Timeline repeats indefinitely.
repetitions
A floating-point number or integer greater than zero that specifies how many times the timeline repeats.
1
Default. Timeline runs only one time.

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

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

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

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

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

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

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