Compartir a través de


segmentDur Property

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

Gets the duration of an element on a timeline in seconds, including autoReverse.

Syntax

[ iDuration = ] currTimeState.segmentDur

Possible Values

iDuration Integer that receives the duration of an element on a timeline in seconds, including autoReverse.

The property is read-only. The property has no default value.

Example

This example uses the segmentDur property to retrieve the duration of the elements on the timeline.

<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<?IMPORT namespace="t" implementation="#default#time2">
<SCRIPT>
function getSegmentDur(){
    s1.innerText += d1.currTimeState.segmentDur; 
    s2.innerText += d2.currTimeState.segmentDur;
}
</SCRIPT>
<STYLE>
    .time{ behavior: url(#default#time2);}
</STYLE>
</HEAD>

<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF"
    LINK="#000000" VLINK="#808080" ALINK="#000000">

<t:excl id="t1" onbegin="getSegmentDur();">
    <t:priorityclass peers="pause">
        <SPAN id="d1" class="time" begin="0" dur="10">
            <H3>Paragraph 1</H3>
            <P>Paragraph 1 is displayed until it is interrupted by the
            next element (at 5 seconds); it then resumes its
            duration of 10 seconds.
            </P>
        </SPAN>
        <SPAN id="d2" class="time" begin="5" dur="5">
            <H3>Paragraph 2</H3>
            <P>Paragraph 2 is displayed for 5 seconds; Paragraph 1 then
            resumes its duration.
            </P>
        </SPAN>
    </t:priorityclass>
</t:excl>

<BR>
<B>Duration of paragraph 1 on timeline:&nbsp;</B><SPAN id="s1"></SPAN>&nbsp;second(s)
<BR>
<B>Duration of paragraph 2 on timeline:&nbsp;</B><SPAN id="s2"></SPAN>&nbsp;second(s)

</BODY>
</HTML>

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

Applies To

currTimeState

See Also

Introduction to HTML+TIME, activeDur, dur, mediaDur, repeatDur, simpleDur