
Traditional publishing mechanisms for rich media content created for Adobe Flash Player often rely on the twice-cooked method to embed SWF files into HTML pages. One major drawback of this method is that it is based on old-fashioned, vendor-specific markup that doesn't comply with modern web standards and also doesn't allow you to nest fallback content inside of it.
To solve this problem, we created SWFObject 2, which offers multiple standards-friendly methods to embed rich media content into web pages. It supports the use of alternative (substitute) content to display content to people who browse the web without plug-ins, to help search engines index your content, and to point visitors to the Adobe Flash Player download page.
SWFObject 2 offers two distinct methods to embed rich media content created for Flash Player: static publishing and dynamic publishing. Both publishing methods enable you to use alternative content, although they each achieve this differently:
object element and lets the browser decide whether to display SWF content or—if it cannot
render this—nested fallback content.There is a subtle difference between the two publishing methods. For example, static publishing shows rich media content to people whose browsers do have Flash Player installed but do not support JavaScript, while dynamic publishing won't show it. Also, for both publishing mechanisms, search engines can interpret alternative content and SWF content (if supported) in a different way.
This tutorial introduces you to using alternative content to improve the overall user experience and searchability of your web content. For an introduction to SWFObject 2, please read Detecting Flash Player versions and embedding SWF files with SWFObject 2.
To complete this tutorial, you will need to install the following software and files:
You should have a basic understanding of the Flash authoring tool, HTML, and JavaScript.
Bobby van der Sluis works at Refunk, an award-winning creative agency based in Amsterdam, The Netherlands, that specializes in Adobe Flash. He is a big fan of both web standards and Adobe Flash, and occasionally has the urge to write about these topics on his personal website or for online magazines. He is the creator of UFO and coauthor of SWFObject 2—two well-known, open-source JavaScript libraries for detecting Adobe Flash Player and embedding SWF files into web pages.