segmentDur property

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

Syntax

JScript
Duration = object.segmentDur

 

Property values

Type: Integer

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

Examples

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

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

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

See also

currTimeState

Reference

activeDur

dur

mediaDur

repeatDur

simpleDur

Conceptual

Introduction to HTML+TIME