speed Property

Internet Development Index

Retrieves the playback speed of an element at run time, which includes the cascading effect of the speed set for the parent time container.

Syntax

[ fcurrSpeed = ] currTimeState.speed

Possible Values

fcurrSpeedFloating-point that receives the run-time speed of an element.

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

Remarks

The value of this read-only property reflects the speed settings inherited by the element from its parent time container. For example, if the speed properties of both an element's parent time container and the element itself are set to 0.5, the element plays back at 25% of its normal playback speed. In other words, the parent plays at 50% speed and the child plays at 50% of the parent speed, yielding a 25% playback speed for the child.

Example

The following example accesses an element's speed property at run time. Click the buttons to see the difference between the speed of the video element and the value of the speed property exposed by the currTimeState object. In this case, the speed value is the product of speed settings for the element and its parent.

<HTML XMLNS:t ="urn:schemas-microsoft-com:time">
<HEAD>
<TITLE>speed Property</TITLE>
<STYLE>
.time{ behavior: url(#default#time2);}
</STYLE>
<?IMPORT namespace="t" implementation="#default#time2">
</HEAD>
<BODY>
<t:PAR id="p1" SPEED="2" >
<t:VIDEO id="v1" BEGIN="1" style="position:absolute; top:80px; left:20px;
height:100px;"
src="shuttle3.wmv"
speed="1.5"
/>
</t:PAR>
<BUTTON class="time" style="position:absolute;top:200px" repeatCount="indefinite"
onclick="alert('Run time speed: ' +  v1.currTimeState.speed);">
Run time speed</BUTTON>
<BUTTON class="time" style="position:absolute;top:200px;left:150px"
repeatCount="indefinite" onclick="alert('Video element speed: ' + v1.speed);">
Video element speed</BUTTON>
</BODY>
</HTML>
This feature requires Microsoft?Internet Explorer 5.5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Applies To

currTimeState

See Also

Introduction to HTML+TIME