PageFlip Version Detection Fix

Unfortunately the release of Adobe Flash Player 10 has revealed a weakness in my version detection code. As a result, the pageflip SWF will fail to load and viewers will be prompted to download the Flash 6 Player. Fortunately there are 2 quick fixes.

Solution #1 (Bypass): If you didn’t modify the file too heavily and you don’t want to mess around in the Flash authoring environment then this solution might be for you:

  1. Download and save this “pageflip-shim.swf” file.
  2. Upload the “pageflip-shim.swf” file to the same directory as the file which needs to be fixed.
  3. Append “-content” to the name of the broken SWF file. For example if your pageflip file is called “mybook.swf”, change its name to “mybook-content.swf”.
  4. Change the name of the “pageflip-shim.swf” to the original name of the broken SWF. In this example you would change “pageflip-shim.swf” to “mybook.swf”.
  5. Now your HTML page will load the renamed “shim” file. The shim file will then load a SWF file of the same name with “-content” appended to it. Once the ‘content’ file has sufficiently loaded, the ‘shim’ file will send it to a frame beyond the faulty version detection code.

Here’s the ActionScript used in the “pageflip-shim.swf” file:

//
// Set the stage properties.
Stage.align = "TL";
Stage.scaleMode = "noScale";
//
// Get the URL address of this file.
var url = unescape(this._url);
//
// Determine the name of this file.
nameRoot = url.slice(url.lastIndexOf("/")+1, url.lastIndexOf(".swf"));
//
// Create a clip to load the original pageflip file into.
createEmptyMovieClip("Holder", 1);
//
// Maintain references to _root inside the clip being loaded.
Holder._lockroot = true;
//
// Hide the pageflip file until the prompt to upgrade goes away.
Holder._x = Holder._y = 5000;
//
// Load the original pageflip file,
Holder.loadMovie(nameRoot+"-content.swf");
//
// Reveal the pageflip file after the prompt to upgrade goes way.
onEnterFrame = function (){
    if (Holder._framesloaded>4){
        Holder.gotoAndPlay(4);
        Holder._x = Holder._y = 0;
        onEnterFrame = null;
    }
}
//
//

Solution #2 (Remove): If the above solution doesn’t work for you, or if you don’t mind working within the Flash authoring environment, it’s extremely easy to remove the version detection from the FLA file. Here’s how:

  1. Open your pageflip FLA file.
  2. Right-click the second frame of the “Actions” layer and choose “Clear Keyframe”.
  3. Right-click the third frame of the “Actions” layer and choose “Clear Keyframe”.
  4. Right-click the “Detector” layer and choose “Delete Layer”.
  5. Publish the new SWF file and upload it to your server.

There is virtually no drawback to removing or bypassing the version detection code. It only affects visitors with Adobe Flash Player 5 or lower, they’ll no longer see the blue prompt urging them to upgrade to Flash Player 6.

I apologize for any inconvenience this may have caused. Thanks for your understanding.

5 Responses to “PageFlip Version Detection Fix”

  1. Harrogateweb says:

    Hi, Mine no longer plays on page load with flash player 10, you have to right click in the movie then click play, applied your shim fix but is still the same.

    See here http://www.ellisadvertising.co.uk/news-flprofiletest.htm

    Regards
    Kevin

  2. Spirit says:

    Merci beaucoup pour cette info . Vous êtes super sympa !

  3. Pixelwit says:

    @Karessa, Look on the bright side, some could see it as “bad pumpernickel” while others might see it as a “great doorstop”. 😉 You’re welcome and thank you.

    @Turbo, You’re welcome and thanks too.

  4. Turbo says:

    I agree, and I Thank you again!

  5. Karessa aka Bad Pumpernickel Person says:

    Thank you, thank you, thank you for being so prompt and thorough with a fix. This is just what I came for and I didn’t even have to search! You rock.

Leave a Reply

PixelWit.com's Comment Guidelines


Warning: Undefined variable $user_ID in /home2/pixelwit/public_html/blog/wp-content/themes/fvariant2/comments.php on line 57

You must be logged in to post a comment.

© Sean O'Shell 2007-2024