怎么判断flash显示不成功时,替换成图片
如题,代码
<div id="div1">
<center>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1095" height="620" id="index" >
<param name="movie" value="images/hy1.swf">
<param name="quality" value="high">
<embed src="images/hy1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1095" height="620" name="index" allowScriptAccess="sameDomain"></embed>
</object>
</center>
</div>
<div id="div2"><img src=""/></div>
------解决方案--------------------if(fls.f) {document.write("您安装了flash,当前flash版本为: "+fls.v+".x");}
else
{
document.getElementById(
'div1').style.display="none";
document.getElementById(
'div2').style.display="block";
}