Creating an entry page

To use the Dispatcher you need to create an HTML entry page containing the code that detects the Flash Player; there is no visible content on the page. You can customize the enter.html entry page provided in the deployment kit, or you can create an entry page from scratch based on enter.html.

The enter.html page contains references to the Dispatcher.js and Dispatcher.vbs files. It also calls a JavaScript function, MM_FlashDispatch that is defined in the Dispatcher.js file. This function detects whether a visitor's Web browser has the Macromedia Flash plug-in or ActiveX control installed, and if so, which version. It then does one of the following: loads a page containing Macromedia Flash content, loads a page containing alternate content, or oversees the update or installation of the Flash Player.

When script-based detection of the player is not possible, MM_FlashDispatch attempts to load a Macromedia Flash movie (detectFlash.swf) to carry out the detection.

 
Understanding the function parameters
The MM_FlashDispatch function takes eight parameters. The syntax for MM_FlashDispatch is shown below, with the parameters enclosed in parentheses:

MM_FlashDispatch (contentURL, contentVersion, requireLatestRevision, upgradeURL, install, installURL, altURL, overridePluginsPage)

You can change the parameters passed to the MM_FlashDispatch() function to customize your deployment scenario. There are three possible outcomes of the detection process:

The detected version of the Flash Player is suitable to play the Flash movie as specified by the contentVersion parameter. The MM_FlashDispatch function loads the Flash content specified by the contentURL parameter.
An unsuitable version of Macromedia Flash Player is detected. The MM_FlashDispatch function loads contentURL if automated updating is supported and specified on the browser & platform; otherwise, it loads the content specified by the upgradeURL parameter.
Macromedia Flash Player is not installed. If install is set to true, MM_FlashDispatch loads contentURL if specified and the browser supports automated installation; otherwise, it loads installURL. If install is set to false, MM_FlashDispatch loads altURL.

The following is a list of parameters for the MM_FlashDispatch function:

contentURL specifies the URL of document containing Macromedia Flash content.

contentVersion identifies the version of Macromedia Flash software used to author content.

requireLatestRevision is a true or false value that indicates whether to require the latest revision of the Flash Player (plug-in only).

upgradeURL specifies the document to load if Flash Player must be upgraded to play content and automated updating is not supported on the visitor's browser and platform.

install is a true or false value that indicates whether to install the Flash Player if it is not installed

installURL specifies the document to load if install is set to true and automated installation is not supported by the browser and platform.

altURL specifies the document to load if install is set to false.

overridePluginsPage is a true or false value that indicates whether to set the PLUGINSPAGE attribute for the embedded Flash Player sniffer (detectFlash.swf) to installURL.

DisableAutoInstall is a true or false value that indicates whether to allow ActiveX control auto-installation of the Flash Player

 
Setting the function parameters
If you use Macromedia Dreamweaver to author HTML pages, follow the Use and Installation Notes in the Macromedia Flash deployment kit to install and use the Macromedia Flash deployment kit Dreamweaver behavior. Once installed, you can use this behavior to change the parameters of the MM_FlashDispatch() function in a Dreamweaver dialog box.

To change the MM_FlashDispatch() parameters without Dreamweaver:

1 Open enter.html in an HTML or text editing program.
You will see the following code:
<SCRIPT LANGUAGE="JavaScript">
//Change the parameters in this function to direct users 
//to the appropriate content
MM_FlashDispatch(
 "flash/index.html",        // contentURL
 "5.0",                     // contentVersion
 false,                     // requireLatestRevision
 "upgradeFlash.html",       // upgradeURL
 !MM_FlashUserDemurred(),   // install
 "installFlash.html",       // installURL
 "noflash/index.html",      // altURL
 false,                     // overridePluginsPage
 false                      // disableAutoInstall
    );
</SCRIPT>
2 Enter values for each parameter.
For more detailed information about each parameter, see the Dispatcher API Reference in the Macromedia Flash deployment kit.
3 Choose Save As to save a copy of the file.
If this is the first page of your site, name the file index.html.
To Table of Contents Forward to next document