Flash in Web page "Click to activate and use this control" workaround
Source: Internet
Author: User
Resolve | control | Web page in the Web page inserted in the Flash, in the page browsing will be annoying tip "Click Activate and Use this control," The Flash file has a border around the display, you must click the Flash to eliminate the hint, it is really troublesome.
Usually did not care, recently felt looking at the page of the flash more sad, then search some solutions sorted out:
The first thing to understand is the Web page with Flash content. Why does "click Activate and Use this control" appear in IE browser?
To avoid a patent infringement dispute with Eolas and the University of California, Microsoft has released an IE non-security update, the system number is a kb912945 patch. (http://support.microsoft.com/kb/912945) After installing this patch, IE will change the way ActiveX controls and Java programs are handled, and will not actively activate by default. As a result, users need to click the mouse one more time while accessing the Web content such as Flash ads, but the non-interactive controls will not change.
The first solution is, instead of inserting flash directly into the Web page, define a page element in the Web page, and write the flash code to the element display through the innerHTML method.
1,js file Flash.js
function Insertflash (Elm, URL, W, h) {
if (!document.getelementbyid (Elm)) return;
var str = ';
STR + + ' <object width= ' + w + ' "height=" ' + H + ' "classid=" clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 "codebase=" http ://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0 ">";
STR + + ' <param name= ' movie ' value= ' + URL + ' > ';
STR + + ' <param name= ' wmode ' value= ' opaque ' > ';
STR + + ' <param name= ' quality ' value= ' autohigh ' > ';
STR + + ' <embed width= ' + w + ' "height=" ' + H + ' "src=" ' + URL + ' "quality=" Autohigh "wmode=" opaque "type=" application/x-s Hockwave-flash "Plugspace=" http://www.macromedia.com/shockwave/download/index.cgi? P1_prod_version=shockwaveflash "></embed>";
str = ' </object> ';
document.getElementById (elm). InnerHTML = str;
}
The four parameters of the function Insertflash (Elm, URL, W, h) represent the element name in the Web page, the Flash animation file path address, and the long and wide flash animation to display.
2, need to display Flash page file reference to the JS file
3, how to display Flash animation. I just said that. Defines a definition to name a page element. Apply functions defined in JavaScript for innerhtml operations
<div id= "Testflash" ></div>
<script type= "Text/javascript" >
Insertflash (' Testflash ', ' flash/main.swf ', 350, 500);
</script>
Where div is a page element, the ID is "Testflash", then the application function times into the name, the rest of the parameters are described.
now, of course ,We are looking at the Web pages containing flash are produced by Web page makers using the software, many users are currently using Dreamweaver, although the current Dreamweaver has been to Dreamweaver CS3 (Dreamweaver 9), But there are still a lot of users who use earlier versions, Dreamweaver8 users, but also need to note:
Upgrade your Dreamweaver 8 to 8.0.2 To resolve flash "Click Activate and Use this control"。
Similarly, Dreamweaver when a user inserts a FLASH element into a Web page, Dreamweaver automatically generates a JS file: Ac_runactivecontent.js, which is uploaded when the site is uploaded.
It is recommended that you use Dreamweaver upgrades.
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