Accessibility
Bobby van der Sluis

Bobby van der Sluis

Refunk
bobbyvandersluis.com

Table of Contents

Created:
10 November 2008
User Level:
Beginner
Products:
Flash

Providing alternative content for SWF files

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:

  • Static publishing uses the HTML object element and lets the browser decide whether to display SWF content or—if it cannot render this—nested fallback content.
  • Dynamic publishing follows the principles of progressive enhancement and uses markup to define alternative content and unobtrusive JavaScript to replace this with SWF content if the minimal Flash Player version is installed and the required JavaScript support is available.

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.

Requirements

To complete this tutorial, you will need to install the following software and files:

Flash Player 9 or later

Code editor of choice


Sample files:

Prerequisite knowledge

You should have a basic understanding of the Flash authoring tool, HTML, and JavaScript.

About the author

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.