当前位置: 代码迷 >> JavaScript >> 用JS写的 Flash在FF不显示,IE通常
  详细解决方案

用JS写的 Flash在FF不显示,IE通常

热度:133   发布时间:2012-09-01 09:33:02.0
用JS写的 Flash在FF不显示,IE正常
<!-- 
var focus_width=310;  
 var focus_height=232; 
var text_height=0; 
var swf_height = focus_height+text_height; 
var pics = 'http://www.gkfree.com/UpFile/Big/20123221744918.jpg|http://www.gkfree.com/UpFile/Big/20123221755934.jpg|http://www.gkfree.com/UpFile/Big/20123271757742.jpg|http://www.gkfree.com/UpFile/Big/20123271758524.jpg';
var links = '#|#|#|#|'; 
var texts = '新闻幻灯1|新闻幻灯2|新闻幻灯3|新闻幻灯4'; 
document.write('<object ID="focus_flas" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">'); 
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/include/playswf.swf"><param name="quality" value="high"><param name="bgcolor" value="#FFFFFF">'); 
document.write('<param name="menu" value="false"><param name=wmode value="opaque">'); 
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">'); 
document.write('<embed ID="focus_flash" src=/include/playswf.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#C5C5C5" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>'); 
//-->

------解决方案--------------------
我上次也遇到同样的问题 结果是ff没装flash播放的插件 不知道你这是不是
------解决方案--------------------
非常有可能是这种情况,2个浏览器是都要装flash的,光在IE下装了是没用的.
  相关解决方案