Wide World Of Web Design

Web Design 101: A practical guide to building websites

Wide World Of Web Design header image 2

SWFObject in a Flash

November 13th, 2007 · No Comments

flashWhen embedding Flash in your HTML pages, you have to consider the fact that not every user viewing your web page will have the Flash Player installed on their computer. This will be a relatively small percentage but it’s hard to say for sure just how many people that includes, and unless you want people staring at a blank space where your flash movie is meant to appear than you better get on the SWFObject train.

This can be considered basic level Flash 101 stuff, but it’s surprising how many instances there are of Flash being misused or implemented without following all the necessary steps to ensure the web page doesn’t come off as the work of an inexperienced hack. SWFObject is the creation of Geoff Stearns, and is an external javascript file that dynamically adds the Flash embed code in the html page, detects Flash Player plugins, and adds alternate content if a Flash Player isn’t detected or Javascript is turned off in a user’s browser.

You can read all about it HERE, but if you aren’t even interested in rolling up your sleeves and adding it manually to see how it works, you can download an extension for Dreamweaver that will do it all for you in a couple of simple steps. How sweet is that ? This is courtesy of Paul Newman at Community MX, and you can read what he has to say about it and download the extension HERE. To test it, simply turn javascript off in your browser to see the alternate text that appears when someone doesn’t have the proper Flash plugin or Javascript enabled.

This is one of many Dreamweaver extensions I’ve gotten a lot of use from, and the time it saves you in your daily workflow on any given project is something you’ll find yourself praising time and time again . . .

 

 


 

 

Tags: Flash