I'm sure you've all heard and read a great deal about the changes that Microsoft will implement in its next browser release and the way in which it will influence the embedding of "Active Content" (Flash, Shockwave, Real, Windows Media, PDF, ...).

For those that didn't, I'll give you a quick runthrough of what exactly is going on. Eolas sued Microsoft concerning a patent that involves the automatic launching of embedded Active Content in an HTML document. The court ruled in favour of Eolas and ordered Microsoft to pay for damages of the patent infringement. Needless to say Microsoft is appealing this judgement, the legal process for does however take considerable time and to limit its liability the company is working on a system that does not infringe the Eolas patent.

What Microsoft will be doing is displaying a message every time active content is loaded on your page, so for every embedded element you'll get a prompt. There is currently a beta version of this IE6 browser update available on the MSDN site that will show you this behaviour.

Macromedia has actively been following this case ever since the ruling against Microsoft and is working on developing some open-source tools that help automate content updates for getting around this prompt for the upcoming IE browser release (expected early next year). It has even set up a Active Content Developer Center dedicated to the issue where they'll be posting all information on solutions that are available to us.

The solution that up to know looks the most promising one for the average Flash developer is using external JavaScript to write the OBJECT and EMBED tag dynamically out to the browser.

Many people where complaining that with this solution they would have to create seperate .js file for every instance of active content on their site. Luckily that need not be the case!

I started working on a generic JavaScript function that you can call for all Flash content. The "insertFlash" function takes four arguments: swf, width, height, bgcolor and params. The first three arguments are required, the bgcolor argument simply reverts to a default color if it is not set. The final "params" argument takes an object and parses that to both PARAM child-tags for the OBJECT tag and attributes for the EMBED tag.

Here is a simple example of how you would use the insertFlash function:


You can download the JavaScript function and an example HTML file here (2Kb). Please note that this is the first release, if you're experiencing any problems with it please drop me a line!