Activating Flash Programmatically - Getting Around the Eolas Patent



After a recent Windows update you may have noticed that all Flash content (and any ActiveX control) displays a new message that says:

“Click to activate and use this control”

This only applies to Internet Explorer and is a result of a patent filed by Eolas, Inc. While I’m not interested in discussing whether or not I agree with this patent I’m glad to know that there’s a workaround. The workaround enables Flash content to be automatically accessible without having to click it first. I’ve found it rather annoying to see the dotted outline around Flash content and actually having to click to enable it, which I feel lessens the user experience.

Luckily Microsoft has released an article that discusses how developers can get around this programmatically. That means users will be able to interact with Flash content as they did prior to the update. The key is whether or not the developer or webmaster takes the necessary steps to enable this on their sites.

The fix is rather simple and basically consists of pulling your object/embed code out the document and writing it dynamically using JavaScript. For example, let’s say you have the following Flash content in your page:

[object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="" width="746" height="200" id="homepage_globe" align="middle" wmode="opaque"][param name="allowScriptAccess" value="sameDomain" /][param name="menu" value="false" /][param name="wmode" value="opaque" /][param name="movie" value="homepage_globe.swf" /][param name="quality" value="high" /][param name="bgcolor" value="#ffffff" /][embed xsrc="homepage_globe.swf" mce_src="homepage_globe.swf" quality="high" bgcolor="#ffffff" width="746" height="200" name="homepage_globe" align="middle" allowScriptAccess="sameDomain" menu="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /][/object]

All you need to do is replace this with the following code:

[script xsrc="my_flash.js" mce_src="my_flash.js" language="javascript"][/script]

and within the JavaScript include you’ll dynamically write the content to the page:

document.write(’[object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="" width="746" height="200" id="homepage_globe" align="middle" wmode="opaque"][param name="allowScriptAccess" value="sameDomain" /][param name="menu" value="false" /][param name="wmode" value="opaque" /][param name="movie" value="homepage_globe.swf" /][param name="quality" value="high" /][param name="bgcolor" value="#ffffff" /][embed xsrc="homepage_globe.swf" mce_src="homepage_globe.swf" quality="high" bgcolor="#ffffff" width="746" height="200" name="homepage_globe" align="middle" allowScriptAccess="sameDomain" menu="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /][/object]‘);

After implementing this method your Flash content should automatically be activated and your users will never know the Eolas patent ever existed! Here’s a before and after shot:



2 Responses to “Activating Flash Programmatically - Getting Around the Eolas Patent”

  1. Guilherme says:

    Hi, is it possible to enable my computer to get around it on the sites? because i have problems every time i see a page with an activex control, and i’d like to make things here more dinamics…
    thanks, Guilherme

  2. I don’t know of any way to fix this other than getting the site owners to update their pages with the fix. If I come across something I’ll be sure to post it.

Leave a Reply