The Flash Player has featured an express install option for quite a while now. I assumed that most developers were not taking advantage of it because Flash 7 didn’t offer many compelling reasons to force an end user to upgrade from Flash 6. With the release of Flash 8, I thought the Flash Player Express Install would catch on like wildfire. It hasn’t, and after recently incorporating it into a major site I’ve worked on, I’ve come up with a few reasons as to why it may not be as popular as it should.

For those of you unfamiliar with the Flash Player Express Install, it’s an automatic plugin upgrade feature which can be initiated by Flash websites. In the past, sites would get users to upgrade the Flash Player by forwarding them to the Macromedia* website. The Macromedia website would initiate the install of the latest plugin. Sometimes this installation required the restarting of the browser (depending on which browser was being used).

The problem with this process was that it redirected the user away from the initial site and to Macromedia instead. Enter the Flash Player Express Install. Beginning with version 6 r65, the Flash plugin was touted as being able to seemlessly upgrade itself. This is not quite accurate, as the installation closes down the browser, but reopens it back to your website. Either way, this is a much better user experience than the previous method.

To take advantage of Flash Player Express Install, you should probably download the Flash Detection Kit, and read Best Practices for Flash Player Detection. There is also a pretty good tutorial on TonyPa’s website. Unfortunately, implementing the Flash Player Express Install involves incorporating an obscure collection of poorly documented code into your site.

The first part of this code is a collection of flash detection javascript. Unfortunately Macromedia failed to organize this code into a collection of javascript functions or objects and also failed to externalize this code into .js files. The second half of the code involves loading a mysterious .swf from the macromedia website and then setting parameters and receiving events from it in an awkward fashion. To add to the difficulty, the parameters you can set and what they do are not well documented anywhere. You need to sift through example files to get an idea of how they work and when certain events fire.

For an example where things can go wrong, there is a variable called MMdoctitle that you are told to set in a .swf you load from Macromedia. What does “MMdoctitle” do exactly? It is never made entirely clear in the example, and TonyPa suggests it’s used in IE to close the window which spawned the install. However, simply setting this variable is not enough, as I will point out later.

In another instance of strange behavior, the Download.Complete event fires when the download of the upgrade is complete, but that does not necessarily mean the install is finished. This can be a problem. In environments where the user is prevented from upgrading their browser by security restrictions (e.g., many corporate workplaces), the install will fail, but you will receive a Download.Complete event and your base window will remain open. There is no great way to handle this common scenario. I built a work-around using ambiguous messaging to the user and a LocalConnection to forward the base window to a final completion message when a the upgrade truly completes. At some point I may clean up and outline this process, but it’s unfortunate you need to use it at all.

Besides the general morass of poorly documented code you deal with, there are a few other obstacles to getting the express install working smoothly. During the express install process, the installer reopens your site in a new window once the plugin has been updated and then closes the original window in order to flush out the old version of the player. However, in order to get this to work, you need to append the string ” – Flash Player Installation” to the title of your document. Failure to do so means the original window never closes. This is generally not an issue if you are pushing an upgrade when a user initially arrives at a site and if you have control over the HTML page in which your movie is embedded. However, this can be problematic in cases where you are integrating the express install into a larger, complex site. If you need to upgrade the user not when they initially arrive at your site, but only when they drill down to a specific piece of content, updating the document title becomes an issue as well.

In general, the Flash Player Express Install is a great feature, but it’s implementation is lacking. There are numerous projects on the internet which try to clean up this process and help to address some of these implementation issues. Geoff Stearn’s Flash Object and Bobby van der Sluis’s Unobtrusive Flash Objects both appear to do a good job of streamlining this process, although I have not personally worked with either solution. If you are trying to incorporate the express install into your site, I would recommend trying to take advantage of their work rather than using the Macromedia implementation directly.

Useful tools for testing: