Solve
Flash in IE has a workaround for the Activate box "click to activate and use this control."
An outer border appears when you move the mouse over flash on a Web page. And there is a "click to activate this control" prompt. Workaround:
1, New JS file:
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;
}
2, Save as: Ac_runactivecontent.js
3, in the required page to add;
<script src= "Scripts/ac_runactivecontent.js" type= "Text/javascript" ></script>
4, insert the location of the Flash add:
<script type= "Text/javascript" >ac_fl_runcontent (' codebase ', ' http://download.macromedia.com/pub/shockwave/ cabs/flash/swflash.cab#version=7,0,19,0 ', ' width ', ' 1002 ', ' height ', ' $ ', ' src ', ' index ', ' quality ', ' High ', ' Pluginspage ', ' http://www.macromedia.com/go/getflashplayer ', ' wmode ', ' Transparent ', ' movie ', ' Index '; End AC Code</script>
<noscript>
<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=" 1002 "height=" >
<param name= "movie" value= "http://www.webjx.com/htmldata/2007-04-22/index.swf" >
<param name= "Quality" value= "High" >
<param name= "wmode" value= "Transparent" >
<embed src= "http://www.webjx.com/htmldata/2007-04-22/index.swf" width= "1002" height= "" "quality=" high " Pluginspage= "Http://www.macromedia.com/go/getflashplayer" type= "Application/x-shockwave-flash" wmode= " Transparent "></embed>
</object>
</noscript>
5, the complete code in the page:
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
Flash in <title>ie the workaround for the Activate box "click to activate and use this control" </title>
<!--load Ac_runactivecontent.js, this is automatically generated for DW files, no need to modify, change the file directory when remember to modify the path here-->
<script src= "Scripts/ac_runactivecontent.js" type= "Text/javascript" ></script>
<style type= "Text/css" >
<!--
Body {
Background-color: #CCCCCC;
}
-->
</style><body>
<!--the following JS modified time to note that a total of four places to modify:
300 is the width;
200 is the height;
Images/killieborder is the path and file name, change note, a total of two, but also pay special attention to the filename after the ". SwF", suffix has been written in Ac_runactivecontent.js-->
<script type= "Text/javascript" >ac_fl_runcontent (' codebase ', ' http://download.macromedia.com/pub/shockwave/ cabs/flash/swflash.cab#version=7,0,19,0 ', ' width ', ' $ ', ' height ', ', ' src ', ' images/killieborder ', ' quality ', ' High ', ' pluginspage ', ' http://www.macromedia.com/go/getflashplayer ', ' wmode ', ' Transparent ', ' movie ', ' images/ Killieborder '); End AC Code</script>
<!--When the browser disables JavaScript, it calls the code in the following <noscript></noscript>, which is the piece of code that we inserted into Flash before Dreamweaver upgraded to 8.0.2. <param> tags work against IE,<embed> tags work for Firefox and Netscape. -->
<noscript>
<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=" height= ">"
<param name= "movie" value= "http://www.webjx.com/htmldata/2007-04-22/images/killIEBorder.swf" >
<param name= "Quality" value= "High" >
<param name= "wmode" value= "Transparent" >
<embed src= "http://www.webjx.com/htmldata/2007-04-22/images/killIEBorder.swf" width= "height=" "quality=" "High" pluginspage= "Http://www.macromedia.com/go/getflashplayer" type= "Application/x-shockwave-flash" wmode= " Transparent "></embed>
</object>
</noscript>