Adobe's Express Install

Flash allows developers to prompt site visitors to upgrade their version of Flash Player if their version is older than the version specified by the developer. This service is called Express Install. SWFObject makes it easy to use Express Install.

Important things to understand about Express Install

Feature of Flash Player not SWFObject

Express Install is NOT a SWFObject feature; SWFObject simply makes it easier for you to trigger Express Install. The actual Express Install process is controlled by Adobe. You can learn more about Express Install at Adobe's website.

Requires an additional SWF file

Express Install requires an additional SWF file (expressinstall.swf), which is provided in the SWFObject ZIP file. This SWF contains ActionScript code that trigger's Adobe's Express Install service. SWFObject does not control the update process at all.

The SWFObject ZIP also includes the source file for expressInstall.swf, which allows you to customize the look and feel of the Express Install experience.

Requires JavaScript

SWFObject's handling of Express Install requires JavaScript. This is because Express Install will only be invoked if the visitor has an outdated version of Flash Player. The only way to know if the visitor has an outdated version of Flash Player is to use JavaScript to detect the Flash Player version. If SWFObject determines Flash Player is outdated, it will use JavaScript to embed expressInstall.swf and trigger the update process.

Requires Flash Player to already be installed

Express Install will only update an outdated Flash Player — it cannot install Flash Player in browsers that don't already have an older version of Flash Player installed. Express Install requires the visitor to have Flash Player version 6.0.65 or higher (Mac and Windows).

Requires visitor to agree to the update

The Express Install feature requires the visitor to agree to upgrade Flash Player; it will not do an automatic upgrade without the visitor's consent.

Relies on browser's handling of Flash Player

The smoothness of the upgrade, including whether or not the visitor is forced to restart their browser after upgrading Flash Player, is at the mercy of the browser and how the browser handles the Flash Player plugin. For instance, Internet Explorer uses ActiveX to install Flash Player and does not require a browser restart. Mozilla Firefox uses an external Flash Player installer mechanism and requires the browser to restart after the installation. (Note: Adobe has released a download manager for Firefox that changes this behavior, but the download manager itself is a Firefox extension that requires a browser restart.)

It's important to note that Express Install isn't always consistent across browsers and operating systems due to differences in browser plug-in architecture and security. Don't expect Express Install to work 100% of the time!

Requires a minimum size when embedding your SWF

Express Install uses the external SWF expressInstall.swf to present an upgrade prompt to the visitor. This prompt is 310px wide and 137px tall. Therefore, if you use Express Install, you must specify a size of at least 310×137 for the embed or you will encounter errors.

Using Express Install

The first thing you should do is decide where to keep your expressinstall.swf file. For simplicity's sake, the examples on learnswfobject.com will keep expressInstall.swf in the same folder as swfobject.js. You can store the file in another directory if you prefer.

SWFObject Static Publishing

The key to using Express Install with static publishing is to add swfobject.registerObject in the document's head, like so:

<script src="/path/to/swfobject.js" type="text/javascript"></script>
<script type="text/javascript">
swfobject.registerObject("mySWFId", "9.0.115", "/path/to/expressInstall.swf");
</script>

The first <script> block is the link to the SWFObject JavaScript file. Express Install will not be invoked if this file is missing. The second <script> block is used to register the SWF with SWFObject. There are three parameters being specified:

  1. ID of the SWF that's being embedded. This must match the ID you use in your markup (<object id="mySWFId" ...>)
  2. Required minimum version of Flash Player. If the visitor has anything older than the version you specify (but at least 6.0.65), they will be prompted to upgrade their Flash Player. You can specify just a major version (such as "9") or include the full major.minor.release ID ("9.0.115"). Be sure to include the quote marks; SWFObject is expecting a string, not a number.
  3. The location of the expressInstall.swf file, relative to your HTML file.

In plain English, this means you're telling SWFObject that "hey, when you embed the SWF that has the ID 'mySWFId', make sure the visitor has Flash Player version 9.0.115. If they don't, use /path/to/expressInstall.swf to ask the visitor to upgrade."

SWFObject Dynamic Publishing

Using Express Install with dynamic publishing is super simple: just add an extra parameter to your SWFObject code:

Without Express Install

swfobject.embedSWF("mymovie.swf", "flashcontent", "550", "400", "9.0.0");

With Express Install

swfobject.embedSWF("/path/to/mymovie.swf", "flashcontent", "550", "400", "9.0.0", "/path/to/expressInstall.swf");

Since we're already specifying a minimum required version of Flash Player when we write our SWFObject JavaScript code, all we need to do is add the location of the expressInstall.swf file (it should always be the 6th parameter in the statement). That's it!

Express Install Examples

The following examples check for the non-existent Flash Player version 20; when you load the page, you will be prompted to upgrade your Flash Player.

Working examples: static publishing | dynamic publishing.

Questions or Comments?

If you have questions or would like to point out an error, please post your remarks in the SWFObject Google Group. Thanks!