Important Information for ActionScript Developers

Macromedia Flash Detection Kit is an ActionScript based version detector for the Macromedia Flash Player. It detects whether the user's web browser has the Macromedia Flash plug-in or ActiveX control installed, and if so, which version. The web developer can configure the version detector to take the appropriate action based on its findings: either load a document containing Macromedia Flash content, load alternate content, or oversee the updating or installation of the player.

ActionScript Example Description
This file demonstrates the behavior and user choices of the Macromedia Flash Detection Kit. This file is an example of how to edit the ActionScript in the Macromedia Flash Detection Kit to control the behavior of the detection scheme.

The file "flash_detection.fla" has code on frame one of the movie.

The following variables can be changed to control the behavior of the detection scheme. All of these are explained in ActionScript comments as well.

altContentURL the URL that the visitor should be sent to if they do not have the required version of Flash. This can be alternate non-Flash content or an upgrade page as in this example.
example: altContentURL = "upgrade_flash/upgrade_flash.html";

flashContentURL the URL that the visitor should be sent to if they have the required version of Flash.
example: flashContentURL = "flash_content/flash_content.html";

contentVersion The required player version necessary to view the content.
example: contentVersion = 7 ;

contentMajorRevision The 'dot' release of the player necessary to view the content.
example: contentMajorRevision = 0;

contentMinorRevision The revision number of the player necessary to view the content.
example: contentMinorRevision = 19;

allowFlashAutoInstall A flag to auto-install the player on Internet Explorer Windows. This basically skips the test and goes right to the Flash content to allow Internet Explorer Windows to auto-update. Important - if you wish to use this, it is recommended that you set this on the Object tag in the HTML and NOT on the embed tag. If you are not familiar with this see the HTML example readme file.
example: allowFlashAutoInstall = false;

requireLatestVersion * * A flag to require the latest available version of the Flash player.

Example
: requireLatestVersion = false
;

* * Important Information about Require Latest Version - If this setting is set to true, it is recommended that you check for the latest version of the player you require and make sure that settings inside the Flash movie reflect the version as well. These settings begin at line 35 of the ActionScript in frame one of the Flash movie. For instance:

MACLatestVersion = 7;
MACLatestMajorRevision = 0;
MACLatestMinorRevision = 19;

Flash 3 Fail-Safe

At the bottom of the ActionScript window you will notice a getURL command that contains a hard coded address.
This is the location for when the visitor has the Flash 3 plug-in or less installed. Since Flash 3 does not support variables, it must be set here in the Flash movie. It is also recommended that you change the setting in the Meta Tag in the HTML. The Meta Tag re-direct is used when all fails, such as when a user does not have Flash installed or has a faulty installation of Flash. The URL setting in this tag is usually set to the same file as altContentURL. For instance:

getURL("upgrade_flash/upgrade_flash.html", "_self");

Installation Instructions
The example file and Flash movie can be edited as needed.
The following files should be uploaded to your server:

  1. flash_detection.swf - this name should not be changed.
  2. actionscript_example.html - this can be renamed as needed.
  3. any HTML file specified in altContentURL
  4. any HTML file specified in flashContentURL