In IE, remove the flash dotted line box (two methods)

Source: Internet
Author: User
This time, I found this method on the Internet, which can solve the headache of many friends. In IE, you must first click "click to activate this plug-in. Here are the operations:
Create a new JS file named "ac_runactivecontent.js": program code // 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;
}

Then add the following content to the head of the application page:

Program code <SCRIPT src = "scripts/ac_runactivecontent.js" type = "text/JavaScript"> </SCRIPT>

Add the following

During the next JS modification, you should note that there are four changes:
300 is the width;
200 is the height;
Images/killieborder is the suffix and the file name. There are two paths when the file name is modified, and a special suffix is required. The file name is not followed by the suffix .swf. This suffix has been written in ac_runactivecontent.js.Program code <SCRIPT type = "text/JavaScript"> ac_fl_runcontent ('codebase', 'HTTP: // response); // end AC code </SCRIPT>

<! -- When the browser disables JavaScript, the code in the <NoScript> </NoScript> section below will be called, that is, the code we inserted when Dreamweaver was upgraded to 8.0.2. <Param> labels work for IE and <embed> labels 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 = "300" Height = "200">
<Param name = "movie" value = "images/killieborder.swf">
<Param name = "quality" value = "high">
<Param name = "wmode" value = "Transparent">
<Embed src = "images/killieborder.swf" width = "300" Height = "200" Quality = "high" pluginspage = "http://www.macromedia.com/go/getflashplayer" type = "application/X-Shockwave-flash" wmode = "Transparent"> </embed>
</Object>
</NoScript>

Complete
Method 2:(This code is not applicable in ff. I tried it today, just add a string of <embed> attributes!This is omitted. colleagues in the same industry should understand what attributes should be written in <embed>? * ^_^ *)Original article address:
Http://www.shou-nao.com/tw/charles/article.cfm? Atc_id = 866ea332-adb0-5700-eb5e9a89b5315ae6
Download example:
Http://www.shou-nao.com/tw/charles/UserFiles/File/noOutline.rar

Local download

Click to download this file

2. Use JavaScript to solve the problem

A. insert it between Code 1: <SCRIPT type = "text/JavaScript" src = "fix_eolas.js" Defer = "Defer"> </SCRIPT>

JS Code: program code // (c) David grudl Aka-DGX-
//
// More info: http://www.dgx.cz/knowhow/eolas-workaround/

VaR objects = Document. getelementsbytagname ("object ");

For (VAR I = 0; I <objects. length; I ++)
Objects [I]. outerhtml = objects [I]. outerhtml; B. insert it between <body> </body>. SWF
Program code <object classid = "CLSID: D27CDB6E-AE6D-11cf-96B8-444553540000" width = "400" Height = "300"
Codebase = "">
<! -- Change the value here to the. SWF file you want to place. -->
<Param name = "movie" value = "jjan_mv_1_21.swf"/>

<Param name = "loop" value = "true"/>
<Param name = "menu" value = "false"/> http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 </Object> references: http://www.qiter.com/blog/article.asp? Id = 491 http://www.stom.com.cn/blog/article.asp? Id = 79

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.