IE中的Flash出现激活框的解决方法_Flash教程
推荐:微软“Flash杀手”Silverlight发布今天拉斯维加斯开幕的NAB展会上,微软正式发布了之前被誉为“Flash杀手”新跨平台网络媒体解决方案(之前的名称为WPF/E),将其定名为Silverlight。开发中的WP
IE中的Flash出现激活框“单击以激活并使用此控件”的解决方法。
当鼠标移到网页中的FLASH上时,会出现一个外边框。并有“单击以激活此控件”的提示。解决方法:
1、新建JS文件:
//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
if (src.indexOf('?') != -1)
return src.replace(/\?/, ext '?');
else
return src ext;
}
function AC_Generateobj(objAttrs, params, embedAttrs)
{
var str = '<object ';
for (var i in objAttrs)
str = i '="' objAttrs[i] '" ';
str = '>';
for (var i in params)
str = '<param name="' i '" value="' params[i] '" /> ';
str = '<embed ';
for (var i in embedAttrs)
str = i '="' embedAttrs[i] '" ';
str = ' ></embed></object>';
document.write(str);
}
function AC_FL_RunContent(){
var ret =
AC_GetArgs
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
, "application/x-shockwave-flash"
);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_SW_RunContent(){
var ret =
AC_GetArgs
( arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
, null
);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
var ret = new Object();
ret.embedAttrs = new Object();
ret.params = new Object();
ret.objAttrs = new Object();
for (var i=0; i < args.length; i=i 2){
var currArg = args[i].toLowerCase();
switch (currArg){
case "classid":
break;
case "pluginspage":
ret.embedAttrs[args[i]] = args[i 1];
break;
case "src":
case "movie":
args[i 1] = AC_AddExtension(args[i 1], ext);
ret.embedAttrs["src"] = args[i 1];
ret.params[srcParamName] = args[i 1];
break;
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblClick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
case "type":
case "codebase":
ret.objAttrs[args[i]] = args[i 1];
break;
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "id":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i 1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i 1];
}
}
ret.objAttrs["classid"] = classid;
if (mimeType) ret.embedAttrs["type"] = mimeType;
return ret;
}
分享:SWFText:菜鸟也能制作Flash动画软件档案软件名称:SWFText软件版本:1.2软件分类:图形图像/图像处理软件大小:1.37MB适用平台:Windows9X/2000/XP/Me软件语言:简体中文作者主
- 相关链接:
- 教程说明:
Flash教程-IE中的Flash出现激活框的解决方法。