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


currentFrame Property

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

Gets a value that indicates the currentFrame of the object.

Syntax

HTML N/A
Scripting [ iFrame = ] object.currentFrame

Possible Values

iFrame Integer that receives the currentFrame of the object.

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

Example

This example demonstrates how to use the currentFrame property to get the current frame every one-hundredth of a second while the media object plays.

<HTML xmlns:t= "urn:schemas-microsoft-com:time">
<HEAD>

<?IMPORT namespace="t" implementation="#default#time2">
<STYLE>
    .time{behavior:url(#default#time2)}
</STYLE>
</HEAD>

<BODY>        
<CENTER>
...
<t:video style="width:175px; height:150px;" id="oMedia"
    src="/workshop/samples/author/behaviors/media/movie.avi"/>
<BR><BR>

<B>Current frame: </B><SPAN id="oCurrFrame" class="time" dur="0.01"
    repeatCount="indefinite" fill="hold"
    onrepeat="innerText=parseInt(oMedia.currentFrame);"></SPAN>
<BR><BR>

<BUTTON onclick="oMedia.beginElement();">Restart</BUTTON>

</CENTER>
</BODY>
</HTML>

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

Applies To

t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, t:REF, t:VIDEO