FLASH 加载进度 JS代码

<div id= " d1 ">
<embed type= " application/x-shockwave-flash " pluginspage= " http://www.adobe.com/go/getflashplayer " id= " mgame " name= " mgame "  width= " 640px " height= " 480px " src= " http://www.kfc123.com/test/hai.swf " allowscriptaccess= " always " allownetworking= " all " wmode= " window " quality= " high ">
</div>
<input id= " txt " type= " text " value= "">
<div id= " d2 " style= " visibility:hidden ">
flash已经加载完成
</div>
<script language= " javascript ">
function ck()
{
var mFlash=document.getElementById( " mgame ");
var txt=document.getElementById( " txt ");
txt.value=mgame.PercentLoaded()+ " % "
if(txt.value== " 100% ")
{
document.getElementById( " d2 ").style.visibility= " visible "
clearInterval(timer)
}
}
var timer=setInterval( " ck() ", 1000)
</script>

你可能感兴趣的:(Flash)