我将ppt转换为swf格式,所以我需要找到该swf文件中的总帧数,如何得到它?以及如何转到给定 swf 文件的最后一帧?
示例:这里我给出了 goto provious 和 next frame 的源代码,但我仍然没有得到第一帧,我怎么能得到它?有什么解决办法指导我...
在这里我怎样才能获得总帧数?请解释一下...提前谢谢..
<html>
<head>
<script language="JavaScript">
function getFlashMovieObject(myFlashMovie)
{
if (window.document[myFlashMovie])
{
return window.document[myFlashMovie];
}
if (navigator.appName.indexOf("Microsoft Internet")==-1)
{
if (document.embeds && document.embeds[myFlashMovie])
return document.embeds[myFlashMovie];
}
else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
{
return document.getElementById(movieName);
}
}
//for Previous frame.....
function PrevFrameFlashMovie()
{
var flashMovie=getFlashMovieObject("myFlashMovie");
var currentFrame=flashMovie.TGetProperty("/",4);
var nextFrame=parseInt(currentFrame);
var prevfram =nextFrame-4;
flashMovie.GotoFrame(prevfram);
flashMovie.Play();
}
//for Next frame.....
function PlayFlashMovie()
{
var flashMovie=getFlashMovieObject("myFlashMovie");
flashMovie.Play();
//embed.nativeProperty.anotherNativeMethod();
}
</script>
</head>
<body>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="595" HEIGHT="460" id="myFlashMovie" style="background:#fff;">
<PARAM NAME=movie VALUE="/file.swf"><PARAM NAME=quality VALUE=autolow >
<EMBED src="/file.swf" quality="autolow" wmode="transparent" autoplay="false" WIDTH="595" HEIGHT="460" NAME="myFlashMovie" ALIGN="middle" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" style="background: none repeat scroll 0 0 #FFFFFF;"></EMBED>
<PARAM NAME=wmode VALUE=transparent><param name="allowScriptAccess" value="sameDomain"/> <param value="false" name="autoplay" /><param name="allowFullScreen" value="True" />
</OBJECT>
<input type="button" onClick="PrevFrameFlashMovie();" value="PreviousFrame" name="Previous">
<input type="button" onclick="PlayFlashMovie();" name="Play" value="NextFrame >>">
</body>
</html>