Activating Flash Programmatically – Getting Around the Eolas Patent
Apr 30
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" /][/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" /][/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:



