"单击以激活并使用此控件"的解决方法

前些天打开ie碰到有关flash的时候就莫名其妙的出现“单击以激活并使用此控件”,四周还有个框框,烦死了

后来终于找到了原因。由于4月份安装了更新系统编号为kb912945的补丁,微软为了避免与eolas公司和加利福尼亚大学之间的专利侵权纠纷,而发布的一个ie非安全更新,这不是什么bug(http://support.microsoft.com/kb/912945)安装这个补丁以后,ie对activex控件和java程序的处理方式将有所改变,默认情况下不会主动激活,因此用户在访问flash广告等网络内容时需要多点击一次鼠标,但非交互式控件不会改变,微软已经通知网站开发人员最好对他们的网页作出相应修改!

解决办法:
1.(推荐)安装kb917425 ie兼容性修补程序,它恢复了4月安全更新 (kb912812) 中包含的 ie active x 更新行为。遇到兼容性问题的客户以及受ie activex更新影响的网站和程序的客户应该使用此修补程序。此修补程序是临时的,并且仅适用于 kb912812.此 ie 兼容性修补程序不可用于将来的安全更新.安装该项之后,您可能需要重新启动计算机.

文件名: windowsxp-kb917425-x86-chs.exe
版本: 917425
知识库 (kb) 文章: kb917425 
发布日期: 2006/4/11
语言: 简体中文
下载大小: 2.0 mb

 本地下载windows-kb917425-x86-chs.exe.rar

2.在控制面板的"添加删除程序"中删除编号为“kb912945”或者“kb912812”或者KB916281的更新补丁,如果列表中没有显示,需要在"添加删除程序"窗口右上角的“显示更新”前打钩。

3.网页设计者可以使用以下代码解决:
<script src="plus/ac_runactivecontent.js" type=text/javascript></script>
<script type=text/javascript>ac_fl_runcontent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0','width','468','height','60','src','flash','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','../images/small_ad' ); </script>

4.flash插入html的方法
写个js脚本文件flash.js

 程序代码

None.gif function  writeflashhtml( arg )
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
InBlock.gif
var parm = []
InBlock.gif
var _default_version = "8,0,24,0";
InBlock.gif
var _default_quality = "high";
InBlock.gif
var _default_align = "middle";
InBlock.gif
var _default_menu = "false";
InBlock.gif
InBlock.gif
for(i = 0; i < arguments.length; i ++)
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gifparm[i] 
= arguments[i].split(' ').join('').split('=')
ExpandedSubBlockStart.gifContractedSubBlock.gif
for (var j = parm[i].length-1; j > 1; j --)dot.gif{
InBlock.gifparm[i][j
-1]+="="+parm[i].pop();
ExpandedSubBlockEnd.gif}

InBlock.gif
switch (parm[i][0])
ExpandedSubBlockStart.gifContractedSubBlock.gif
dot.gif{
InBlock.gif
case '_version' : var _version = parm[i][1] ; break ; 
InBlock.gif
case '_swf' : var _swf = parm[i][1] ; break ; 
InBlock.gif
case '_base' : var _base = parm[i][1] ; break ; 
InBlock.gif
case '_quality' : var _quality = parm[i][1] ; break ; 
InBlock.gif
case '_loop' : var _loop = parm[i][1] ; break ; 
InBlock.gif
case '_bgcolor' : var _bgcolor = parm[i][1] ; break ; 
InBlock.gif
case '_wmode' : var _wmode = parm[i][1] ; break ; 
InBlock.gif
case '_play' : var _play = parm[i][1] ; break ; 
InBlock.gif
case '_menu' : var _menu = parm[i][1] ; break ; 
InBlock.gif
case '_scale' : var _scale = parm[i][1] ; break ; 
InBlock.gif
case '_salign' : var _salign = parm[i][1] ; break ; 
InBlock.gif
case '_height' : var _height = parm[i][1] ; break ; 
InBlock.gif
case '_width' : var _width = parm[i][1] ; break ; 
InBlock.gif
case '_hspace' : var _hspace = parm[i][1] ; break ; 
InBlock.gif
case '_vspace' : var _vspace = parm[i][1] ; break ; 
InBlock.gif
case '_align' : var _align = parm[i][1] ; break ; 
InBlock.gif
case '_class' : var _class = parm[i][1] ; break ; 
InBlock.gif
case '_id' : var _id = parm[i][1] ; break ; 
InBlock.gif
case '_name' : var _name = parm[i][1] ; break ; 
InBlock.gif
case '_style' : var _style = parm[i][1] ; break ; 
InBlock.gif
case '_declare' : var _declare = parm[i][1] ; break ; 
InBlock.gif
case '_flashvars' : var _flashvars = parm[i][1] ; break ; 
InBlock.gif
default :;
ExpandedSubBlockEnd.gif}

ExpandedSubBlockEnd.gif}

InBlock.gif
InBlock.gif
var thtml = ""
InBlock.gifthtml 
+= "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" + ((_version)?_version:_default_version) + "'"
InBlock.gif
if(_width) thtml += " width='" + _width + "'"
InBlock.gif
if(_height) thtml += " height='" + _height + "'"
InBlock.gif
if(_hspace) thtml += " hspace='" + _hspace + "'"
InBlock.gif
if(_vspace) thtml += " vspace='" + _vspace + "'"
InBlock.gif
if(_align) thtml += " align='" + _align + "'"
InBlock.gif
else thtml += " align='" + _default_align + "'"
InBlock.gif
if(_class) thtml += " class='" + _class + "'"
InBlock.gif
if(_id) thtml += " id='" + _id + "'"
InBlock.gif
if(_name) thtml += " name='" + _name + "'"
InBlock.gif
if(_style) thtml += " style='" + _style + "'"
InBlock.gif
if(_declare) thtml += " " + _declare
InBlock.gifthtml 
+= ">"
InBlock.gif
if(_swf) thtml += "<param name='movie' value='" + _swf + "'>"
InBlock.gif
if(_quality) thtml += "<param name='quality' value='" + _quality + "'>" 
InBlock.gif
else thtml += "<param name='quality' value ='" + _default_quality + "'>"
InBlock.gif
if(_loop) thtml += "<param name='loop' value='" + _loop + "'>"
InBlock.gif
if(_bgcolor) thtml += "<param name='bgcolor' value='" + _bgcolor + "'>"
InBlock.gif
if(_play) thtml += "<param name='play' value='" + _play + "'>"
InBlock.gif
if(_menu) thtml += "<param name='menu' value='" + _menu + "'>"
InBlock.gif
else thtml += "<param name='menu' value='" + _default_menu + "'>"
InBlock.gif
if(_scale) thtml += "<param name='scale' value='" + _scale + "'>"
InBlock.gif
if(_salign) thtml += "<param name='salign' value='" + _salign + "'>"
InBlock.gif
if(_wmode) thtml += "<param name='wmode' value='" + _wmode + "'>"
InBlock.gif
if(_base) thtml += "<param name='base' value='" + _base + "'>"
InBlock.gif
if(_flashvars) thtml += "<param name='flashvars' value='" + _flashvars + "'>"
InBlock.gifthtml 
+= "<embed pluginspage='http://www.macromedia.com/go/getflashplayer'"
InBlock.gif
if(_width) thtml += " width='" + _width + "'"
InBlock.gif
if(_height) thtml += " height='" + _height + "'"
InBlock.gif
if(_hspace) thtml += " hspace='" + _hspace + "'"
InBlock.gif
if(_vspace) thtml += " vspace='" + _vspace + "'"
InBlock.gif
if(_align) thtml += " align='" + _align + "'"
InBlock.gif
else thtml += " align='" + _default_align + "'"
InBlock.gif
if(_class) thtml += " class='" + _class + "'"
InBlock.gif
if(_id) thtml += " id='" + _id + "'"
InBlock.gif
if(_name) thtml += " name='" + _name + "'"
InBlock.gif
if(_style) thtml += " style='" + _style + "'"
InBlock.gifthtml 
+= " type='application/x-shockwave-flash'"
InBlock.gif
if(_declare) thtml += " " + _declare 
InBlock.gif
if(_swf) thtml += " src='" + _swf + "'"
InBlock.gif
if(_quality) thtml += " quality='" + _quality + "'"
InBlock.gif
else thtml += " quality='" + _default_quality + "'"
InBlock.gif
if(_loop) thtml += " loop='" + _loop + "'"
InBlock.gif
if(_bgcolor) thtml += " bgcolor='" + _bgcolor + "'"
InBlock.gif
if(_play) thtml += " play='" + _play + "'"
InBlock.gif
if(_menu) thtml += " menu='" + _menu + "'"
InBlock.gif
else thtml += " menu='" + _default_menu + "'"
InBlock.gif
if(_scale) thtml += " scale='" + _scale + "'"
InBlock.gif
if(_salign) thtml += " salign='" + _salign + "'"
InBlock.gif
if(_wmode) thtml += " wmode='" + _wmode + "'"
InBlock.gif
if(_base) thtml += " base='" + _base + "'"
InBlock.gif
if(_flashvars) thtml += " flashvars='" + _flashvars + "'"
InBlock.gifthtml 
+= "></embed>"
InBlock.gifthtml 
+= "</object>"
InBlock.gifdocument.write(thtml)
ExpandedBlockEnd.gif}

None.gif

把此js应用到html:

 程序代码
<script language="javascript" type="text/javascript" src="flash.js"></script>

插入flash时,只需:
<script language="javascript" type="text/javascript">
writeflashhtml("_swf=index.swf", "_width=100%", "_height=100%" ,"_wmode=transparent");
</script>

转载于:https://www.cnblogs.com/ami/archive/2006/07/21/456515.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值