Some tricks

Tricks for web designers and developers

Eolas Fix for Flash: FlashObject

Some news appeared a couple of years ago about the Eolas-Microsoft patent issue: W3C sides with Microsoft against Eolas patent

On April 11, 2006 Microsoft was finally forced to update how ActiveX plug-ins behave in Internet Explorer via Windows Update.

So now if you use Internet Explorer and go to a website that has ActiveX elements (like Flash) inside you will see a tooltip that says: “Click to activate and use this control”.
Now ActiveX elements will not be initially allowed to interact with the user until he/she enables the ActiveX clicking the ActiveX element or pressing Spacebar or Enter.

Fortunately there are some fixes that use Javascript to show the ActiveX information directly. I strongly recommed to use the FlashObject library of Geoff Stearns.
It fix the problem in a nice way and also has other good features:

  • The script can detect the Flash plug-in in all major web browsers (on Mac and PC).
  • Is designed to make embedding Flash movies as easy as possible.
  • It is also very search engine friendly and can be used in valid HTML and XHTML 1.0 documents.

How to use:

  1. Include in your website the flashobject.js Javascript file that you can download HERE.
  2. Then write some Javascript on your page to embed your Flash movie.

    Example:

    <script type="text/javascript" src="flashobject.js"></script>
    <div id="flashcontent">
      This text is replaced by the Flash movie.
    </div>
    <script type="text/javascript">
       var fo = new FlashObject("movie.swf", "mymovie", "200", "100", "7", "#336699");
       fo.write("flashcontent");
    </script>
  3. The parameters are simple:

    swf: the file path and name to your swf file.
    id: the ID of your object or embed tag.
    width: width of your Flash movie.
    height- height of your Flash movie.
    version: required player version for your Flash content.
    background color: the hex value of the background color of your Flash movie.

And that’s all!
Now your flash movies will show in the same way as before and users don’t have to make any extra click or activation.

If you need more information just visit the author’s website: FlashObject: Javascript Flash detection and embed script

So I recommend webmasters to fix their websites to work well on Internet Explorer.

And for normal users and web surfers I strongly recommend to download Firefox because this web browser doesn’t have this annoying problem.
Another good reason to use Firefox.

You can download Firefox at the link below:

7 Comments so far

  1. JH April 25th, 2006 11:36 am

    “This text is replaced by the Flash movie.”

    does this part get replaced by an embed or an object tag?

  2. JH April 25th, 2006 11:37 am

    if so,
    can you show me an example?

  3. admin April 25th, 2006 1:43 pm

    You have an example here:

    http://blog.deconcept.com/swfobject/swfobject.html

    You can deactivate the ActiveX in Explorer and will see that message (in the example is another message) which is useful for search engines too.

  4. nguyen tuan anh May 4th, 2006 12:32 pm

    very useful website with great information

  5. Jonathan May 5th, 2006 12:16 pm

    I have a flash movie that is transparent, the fix dosen’t say anything about making a movie transparent. How can I go about doing this?

  6. admin May 5th, 2006 1:43 pm

    Yes you can, take another look at the fix:

    http://blog.deconcept.com/swfobject/

    You just have to add another parameter called “wmode”, there is an example there.

  7. Charlene June 2nd, 2006 11:00 am

    Hi There,

    Really need help removing the grey box around my flash objects on my web page….Wondering if you can help me out and let me know what I’m missing. I have tried the swfobject but I don’t think I’m doing it correctly. Please advise.

    Thanks,
    Charlene