currentFrame Property (t:ANIMATION, t:AUDIO, t:IMG, ...)

HTML (DHTML)

currentFrame Property

Internet Development Index

Retrieves a value that indicates the currentFrame of the object.

Syntax

HTMLN/A
Scripting[ iFrame = ] object.currentFrame

Possible Values

iFrameInteger 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 retrieve the current frame every 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="../../common/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>
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

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