/12/ publishing flash content with the moock fpi

  1. download the latest version of the detection system as a .zip archive.
    http://www.moock.org/webdesign/flash/detection/moockfpi/

  2. extract the file called moockfpi-???.html from the .zip archive

  3. name that file appropriately as the entry page of your site--probably index.html.

  4. open the newly named page in a text editor.

  5. locate this code block at the top of the file:
    // #############################################
    // these are the user defined globals
    // modify the following variables to customize the inspection behaviour
    
    var requiredVersion = 4;    // version the user needs to view site (max is 5, min is 2)
    var useRedirect = true;     // "true" loads new flash or non-flash page into browser
                                // "false" embeds movie or alternate html code into current page
    
    // set next three vars if useRedirect is true...
    var flashPage = "movie.html"        // the location of the flash movie page
    var noFlashPage = "noflash.html"    // send user here if they don't have the plugin or we can't detect it
    var upgradePage = "upgrade.html"    // send user here if we detect an old plugin
    // #############################################
    
  6. on the line that reads:
    var requiredVersion = 4;
    change the number 4 to the version of flash you require on your site (must be a number between 2 and 5).

  7. set useRedirect to your desired delivery method. two options:

    1. page redirection (good for flash/non-flash style sites)
    2. dynamic page generation (good for accenting a site with flash)

    for redirection, use:
    var useRedirect = true;
    for dynamic page generation, use:
    var useRedirect = false;

  8. when using page redirection, set these variables appropriately:
    var flashPage = "movie.html"
    var noFlashPage = "noflash.html"
    var upgradePage = "upgrade.html"


  9. when using dynamic page generation, modify the object/embed tags in the page body:
    var oeTags = '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
    + 'WIDTH="550" HEIGHT="400"'
    + 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
    + '<PARAM NAME="MOVIE" VALUE="movie.swf">'
    + '<PARAM NAME="PLAY" VALUE="true">'
    + '<PARAM NAME="LOOP" VALUE="false">'
    + '<PARAM NAME="QUALITY" VALUE="high">'
    + '<PARAM NAME="MENU" VALUE="false">'
    + '<EMBED SRC="movie.swf"'
    + 'WIDTH="550" HEIGHT="400"'
    + 'PLAY="true"'
    + 'LOOP="false"'
    + 'QUALITY="high"'
    + 'MENU="false"'
    + 'TYPE="application/x-shockwave-flash"'
    + 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
    + '</EMBED>'
    + '</OBJECT>';
    
    then specify the alternate html content for non-flash users:
    var alternateContent = '<IMG SRC="altimage.gif" HEIGHT="400" WIDTH="550">'
    + '<BR>any desired alternate html code goes here';