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 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 pipwerks.github.io/learnswfobject 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> block is used to register the SWF with SWFObject. There are three parameters being specified:
- ID of the SWF that's being embedded. This must match the ID you use in your markup (
<object id="mySWFId" ...>)
- 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.
- 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");
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.