currentFrame参数属性 | DHTML中文手册 |
Retrieves a value that indicates the currentFrame of the object.
dhtml语法
HTML N/A Scripting [ iFrame = ] object.currentFrame
DHTML可能的值
iFrame Integer that receives the currentFrame of the object. The property is read-only. The property has no default value.
DHTML代码范例
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>
applies to
t:ANIMATION, t:AUDIO, t:IMG, t:MEDIA, t:REF, t:VIDEO