dur property
Sets or gets a value indicating the amount of time the element remains active or displayed.
Syntax
JScript |
---|
|
Property values
Type: String
String that specifies one of the following values.
Remarks
Any media tag, such as img or media, has a default DUR value based on the type of media. For movies, audio, and animated GIFs, the default DUR is built into the media and can be determined by calling the mediaDur property. For static images, the default DUR value is zero seconds. When used with any other type of element, the default value for DUR is indefinite.
The DUR attribute is a value relative to the value of the BEGIN attribute of the element. In contrast, the END attribute represents an absolute value along the parent element timeline, starting at zero seconds. Do not use the DUR attribute on the same element as the END attribute.
For Microsoft DirectMusic, if you set dur to zero on a playing segment, it stops playing at the end of the next measure.
The dur property is read-only on the playItem object.
Examples
This example uses the DUR attribute to display lines of text for different amounts of time.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/dur.htm
<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<STYLE>
.time{ behavior: url(#default#time2);}
</STYLE>
</HEAD>
<BODY BGCOLOR="white">
<SPAN CLASS=time STYLE="COLOR:Red;" BEGIN="0" DUR="5"
TIMEACTION="visibility">
<H3>Paragraph 1</H3>
<P>This is paragraph number one. It displays for five
seconds.</P>
</SPAN>
<SPAN CLASS=time STYLE="COLOR:Blue;" BEGIN="0" DUR="10"
TIMEACTION="visibility">
<H3>Paragraph 2</H3>
<P>This is paragraph number two. It displays for ten
seconds.</P>
</SPAN>
<SPAN CLASS=time STYLE="COLOR:Green;" BEGIN="0" DUR="indefinite"
TIMEACTION="visibility">
<H3>Paragraph 3</H3>
<P>This is paragraph number three. It displays
indefinitely.</P>
</SPAN>
</BODY>
</HTML>
See also
Reference
Conceptual