Please note that the newest version of FlashObject (1.3) changes how ExpressInstall is invoked when using FlashObject. Check out the FlashObject page for examples of using ExpressInsatll.
I’ve just updated FlashObject (now version 1.2.3) to support the new Macromedia Flash Player Express Install.
Macromedia recently introduced a new feature of the Flash Player called “Express Install.” This new method of upgrading offers a few very nice benefits:
- No need to redirect your users to Macromedia.com to upgrade their player.
- No need to rely on built in browser upgrade mechanisms. Internet Explorer users have become more and more wary of trusting the ActiveX install dialog box that pops up all the time and is generally associated with spyware or malware. While Firefox has an excellent plugin finder, other browsers that use the Netscape plugin architecture aren’t so fancy.
- Nearly full control over the upgrade experience, which means no matter what platform your users are running, you will be able to walk them through a nearly identical install proccess.
Because of these benefits, Express Install is now my recommended upgrade method. When used in conjunction with FlashObject, it offers the best possible user experience for your users who need to upgrade their Flash player.
Here’s how it works:
First, add Express Install support to each of the swf files that may require an upgrade. These files need to be at least 215px x 138px in size. This is so the entire upgrade dialog can be seen by the user if the Express Install is triggered. It may also be a good idea to only place one swf with Express Install functionality on each page. This way users won’t be greeted with multiple upgrade dialog boxes and be forced to choose one (keep it simple for your users!).
I’ve included a new AS2.0 class in the latest version of the FlashObject script called ExpressInstall.as – this class contains all the code needed to invoke the Express Install process. All you need to do is place the script somewhere in your Flash class path, and place this code on the first frame of your swf:
if (ExpressInstall.init()) {
stop();
}
The ExpressInstall.init()
function returns true or false depending on whether the Express Install was started. If it starts, it returns true, if it doesn’t start, it returns false.
All other functionality should be moved to at least the second frame of the swf. This ensures that even someone running Flash player 6.0.65 can view the first frame of the movie and will see the upgrade dialog.
Next, you’ll need to upgrade your FlashObject script from 1.2.2 to 1.2.3 (you can get FlashObject here) and alter the embed code slightly only for the swf files that contain the Express Install code.
The new embed code should look like this (view example page):
var fo = new FlashObject("myswf.swf", "myswf", "400", "300", "8.0.22", "#fffff", true);
The only thing that changes is one more parameter after the color set to true. This does three things:
- Tells the FlashObject script that you want to allow for ExpressInstall. The script then gathers the needed information and passes that information into your Flash movie using flashvars.
- Checks to make sure the user has at least Flash player version 6.0.65 installed – this is the lowest version that supports the Express Install process.
- Then, if the user has at least version 6.0.65, but also has a version less than the required version specified in the FlashObject embed (in this example it was “8.0.22”), the Express Install process is started.
Once the install is completed, the installer launches a new browser window, and the user is redirected back to your original page with the new plugin.
And that’s it. You can grab the newest version of FlashObject with the ExpressInstall class here: http://blog.deconcept.com/flashobject/ or you can view an example page that uses this method.
UPDATE (08-18-2005): Macromedia recently updated the Express Install feature, and because of this, my ExpressInstall class was broken. I’ve just fixed it, however, and you can get the latest version by downloading the latest version of FlashObject here.
UPDATE (08-29-2005): If you are not using Actionscript 2, or are exporting your classes on a frame after frame 1, you can use this adaptation of my ExpressInstall class that Carlos Rovira wrote.
UPDATE (12-22-2005): If you are using ExpressInstall on your site, go tell Macromedia what you think about it.