Categories

How to disable ActiveX warning in IE6/7

Template-help.com Team November 15, 2010
No votes yet.
Please wait...
Q: Why do I have to click twice on the flash object to change the page or open a link?  Why does that happen in IE only? A: Control Activation Problem Description: Microsoft has changed the behavior of the Internet Explorer browser to require an activation click on the embedded control before a visitor is allowed to interact with the applet. The change affects all interactive ActiveX controls in a web page. In particular, it affects any Flash movie (SWF) content in a web page. This affects the output from all current and earlier applications which exported HTML/SWF files including Adobe Flash and SWiSHMax software. Interactive controls are ActiveX controls that provide user interfaces. When a web page uses the APPLET, EMBED or OBJECT elements to load an ActiveX control, the controls user interface requires extra click until the user activates it. IE shows a tooltip when you hover over the control that says “Click to activate and use this control”. The user then has to click once to activate and then again to press a button or click a link displayed by the Flash or Java applet. Solution to the problem: There is a workaround to this problem involving an external javascript include, which involves another layer between the embedded control and the browser. A simpler technique that can be used requires only a minimal addition to the existing HTML tags, and a small JavaScript file. Step 1. Add the following line of code right after the opening tag <head>
<script type=”text/javascript” src=”flash/flashobject.js”></script>
Step 2. A JavaScript file (download here) should be placed to the same directory as SWF file, in this example it’s put to the folder “flash”. Now comes the part with replacing the tag with a call to the JavaScript function. Here’s an example: Replace <object> tag:
<object classid=”clsid: D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0″ width=”768″ height=”347″> <param name=”movie” value=”flash/header.swf?button=4″> <param name=”quality” value=”high”> <param name=”menu” value=”false”> <param name=”wmode” value=”transparent”> <!–[if !IE]> < –> <object data=”Flash/header.swf?button=4″ width=”768″ height=”347″ type=”application/x-shockwave-flash”> <param name=”quality” value=”high”> <param name=”menu” value=”false”> <param name=”wmode” value=”transparent”> <param name=”pluginurl” value=”http://www.macromedia.com/go/getflashplayer”> FAIL (the browser should render some flash content, not this). </object> <!–> < ![endif]–> </object>
with JavaScript function:
<div id=”firstflash”> Whatever text or html code you would like get’s put here and will display if the user needs to enable javascript or download flash plugin </div> <script type=”text/javascript”> var fo = new FlashObject(“flash/header_v7.swf?button=0”, “firstflash”, “766”, “267”, “7”, “”); </script> <script type=”text/javascript”> </script> <script type=”text/javascript”> var fo = new FlashObject(“flash/header_v7.swf?button=0”, “firstflash”, “766”, “267”, “7”, “”); fo.addParam(“quality”, “high”); fo.write(“firstflash”); </script>
Step 3. Then save the document and upload it to your server. When previewing the page in IE you will see that it doesn’t require extra click to activate a Flash part. See also: How to disable ActiveX warning in IE6/7 demo movie
This entry was posted in General tutorials, Working with Flash and tagged active-x, flash. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket