Using SWFObject for More than Just Embedding SWFs
Wednesday, March 12th, 2008My favorite mechanism for embedding SWFs, hands down, is Geoff Stearns’ SWFObject. It’s clean, lightweight, and easy to use. Since April 2006, SWFObject has been my first choice for working around the “click to activate and use this control” warning in Internet Explorer. Microsoft has decided to remove this activation behavior from Internet Explorer in April 2008 — right around the corner, as of this writing — but there’s still plenty of reason to keep right on using SWFObject. Why? Because it provides an elegant way to detect what version of Flash Player (if any) a website visitor has installed. If you’re using the On2 video codec, for example, it means your site requires Flash Player 8 or higher. With SWFObject, you can detect if your visitor has at least 8 and then display the SWF; otherwise, display a stand-in message (or image), such as “This site requires Flash Player 8 or higher.” But what if you want to redirect to another page instead? Or what if you want to display two different SWFs, depending on what’s installed? Read on. Keep reading »




