Поделиться через


currentFrame property

Gets a value that indicates the currentFrame of the object.

Syntax

JScript
p = object.currentFrame

 

Property values

Type: Integer

the currentFrame of the object.

Examples

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.

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

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