midwest web design

Flash Active Content Bug

Developers creating web applications with Flash have probably noticed an annoying bug lately with regards to Internet Explorer. When you publish an SWF file through Flash and view it in Internet Explorer, you get a dashed black box around your movie and upon moving your mouse cursor over the box you get the message “Click to activate and use this control” as shown in the following illustration:

Click Here to Activate This Control

If you want to view this bug using your browser, load the following file into Internet Explorer:

Click here to activate this user control

Printable Version
Word PDF

History Lesson

Microsoft lost a suit against a company named ELOAS. ELOAS is an acronym for Embedded Object Links Across Systems. ELOAS claims to own (along with the University of California) the patent for the technology that allows browsers to automatically launch external files like Flash, RealPlayer, MP3, and PDF. Microsoft argued in court that the technology it uses is different from that developed by ELOAS. However, the US District Court for Northern Illinois disagreed and ordered Microsoft to pay ELOAS $527 million in damages. In addition, ELOAS asked Microsoft to pay a licensing fee for each embedded object launched in Internet Explorer. Not surprisingly, Microsoft refused the demand and as a result is making changes to versions of Internet Explorer due out in early 2004.

How to fix this

Numerous solutions are available which involve writing the embed tag through a JavaScript function. Unfortunately most of these are unreliable, especially Adobe’s fix. The most reliable and stable fix is available at: http://www.webreference.com/programming/ie/

Here’s how the script works

It creates one external JavaScript file which writes the object and embed tag to the browser through JavaScript and a function. In the file that originally contained the Flash movie, you simply call the JavaScript function. For example, we have one HTML file, movie.html, and a JavaScript file, movie.js. Follow these steps:

In movie.html, select the below code, right-click and select Cut

<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="750" height="520">
<param name="movie" value="clickheretoactivatecontrol.swf" />
<param name="quality" value="high" />
<embed src=" clickheretoactivatecontrol.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="520"></embed>
</object>

In movie.js, highlight the below JavaScript and select Copy:

function iefix() {
   document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/
shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="750" height="520" id="container" align="middle">\n')
   document.write('<param name="allowScriptAccess" value="sameDomain">\n')
   document.write('<param name="movie" value=" clickheretoactivatecontrol.swf">\n')
   document.write('<param name="menu" value="false">\n')
   document.write('<param name="quality" value="high">\n')
   document.write('<embed src=" clickheretoactivatecontrol.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="520" menu="false" loop="false" name="container" align="middle" allowScriptAccess="sameDomain"></embed>\n')
   document.write('</object>\n')
}

Change the value to your SWF file on this line:

document.write('<param  name="movie" value="container.swf">\n')

Change the embed source to your SWF file on this line as well:

document.write('<embed src="container.swf" quality="high"

In movie.html, add the following JavaScript code:

<script src="movie.js"  type="text/javascript"></script><script  type="text/javascript">
<!-- hide script from non-JS browsers
iefix();
// end hide -->
</script>

We simply call the function. Save both your files and preview the results.

Movie fixed

Are other options available?

Some other workarounds involve:

Unfortunately, relying on visitors, especially visitors who are not computer savvy to install the appropriate patch is not the best option or strategy. As a result, developers need to implement one of the many javascript fixes to allow your visitors to interact with the Flash movie.

If you have questions, contact me.

top of page

Thank you for visiting Midwest Web Design.net - Come back again soon.