Some of you fine professionals may already know of this new Adobe approved IE fix, but if you don’t, this is the post for you!
Let’s start with the JS file you’re going to need. Create a new document in your favorite web editing tool (ie. Dreamweaver, Zend, NotePad). And you’ll need to past this in as your JavaScript File:
Download Here:
swfObject
If you want the specifics on what this file does, let me know, or just drop by adobe’s site and search for swfObject.
Now for where you want to embed your flash file. You’ll be using the SWFObject to insert the .swf of your choice with the following:
<div id="flashFix">
<script type="text/javascript">
var so = new SWFObject("Style-85-P-E-cp.swf", "flashFix", "631", "526", "7", "#fff");
so.addParam("wmode", "transparent");
so.write("flashFix");
</script>
</div>
(be sure to remove the spaces)
A quick run down:
“flashFix is the div in which the .swf will be embedded. 500 is the width of the movie, 250 is the height. “7″ is the flash player you’ve published your movie for and the #fff is the background color if one is desired. What so.addParam(”wmode”, “transparent”); is is the ability to display the .swf file without a background.
Besides being very search engine-friendly, SWFObject degrades gracefully, can be used in valid HTML and XHTML 1.0 documents (that is, when pages are sent as text/html instead of application/xhtml+xml), and is forward-compatible. It should work for years to come.
It’s so nice to have this “Fix” validate and work in all browsers. Test it out, feel free to drop any questions. Enjoy!
-T