新出的IE7浏览器在打开有flash的页面时,必须单击以激活才能使用。
这是因为微软某一个更新加强了对网页控件的安全性管理,不过对flash来说大可不必。
有两个方法可以解决这个问题:
1.把输出flash的html语句写在js脚本里。然后在页面中调用该js脚本输出flash。
示例js文件如下(比如存为swf.js):
var str = "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"100%\" height=\"100%\" id=\"demo\" align=\"middle\">";
document.write(str);
str = "<param name=\"allowScriptAccess\" value=\"sameDomain\" />";
document.write(str);
str = "<param name=\"movie\" value=\"index.swf\" />";
document.write(str);
str = "<param name=\"quality\" value=\"high\" />";
document.write(str);
str = "<param name=\"wmode\" value=\"transparent\" />";
document.write(str);
str = "<param name=\"bgcolor\" value=\"#000000\" />";
document.write(str);
str = "</object>";
document.write(str);

2.或者直接把如下代码插入到网页中要放置flash的位置:
<div id="layer25" style="padding:0px; LEFT: 0px; OVERFLOW: hidden; WIDTH: 634px; POSITION: absolute; TOP: 0px; HEIGHT: 530px; z-index:90;"><embed src="FLASH地址" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="宽" height="高" play="true" loop="true" quality="high" scale="showall" menu="true"></embed></div>
RIA Dev | 评论(0) | 引用(0) | 阅读(409)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]