Old Photoshop Galleries Breaking with Flash Player 10

I have a number of old photo galleries generated from Photoshop CS2. A few of them are Flash based gallery.  Recently, I discovered that these were no longer loading and giving me a Flash Player not detected error.  The galleries in fact DO work, and if you click on the pass thru link you will arrive at a working photo gallery. But let’s be honest – what user is going to click that link?

So I started tracing the code and located the problem inside the FlashObject.js file. It’s quite comical really. The Flash Player detection code grabs a plugin description (ie: Flash Player 9.34) and then checks for the version by finding the period and selecting the character to the left. Woot!!! We have the version #.

Here was the code:

flashversion = y.charAt(y.indexOf(‘.’)-1);

Except, while that worked for versions 1-9, we now are at 10. And the above code returns a version number of zero.  So I modified the code below. It’s not the tightest code but it’s more readable.

var tmp10 = y.charAt(y.indexOf(‘.’)-2);
var tmp1 = y.charAt(y.indexOf(‘.’)-1);
if(isNaN(tmp10) == false)
{
flashversion = tmp10 + ” + tmp1;
}
else
{
flashversion = y.charAt(y.indexOf(‘.’)-1);
}

The result…Flash Player 10 is now detected. As will be other double-digit versions. And frankly, if my photo galleries are still around by Flash Player 100 – I will probably not be!

***
I am posting the revised version of this file for download for those who are not programming literate. Simply download and unzip this file and replace the old FlashObject.js from your Photoshop CS2 generated photo gallery.

Download Revised flashobject.js File

Advertisements

6 Responses to “Old Photoshop Galleries Breaking with Flash Player 10”


  1. 1 John Dowdell January 7, 2009 at 3:18 pm

    Yikes, sorry for the hassle, but thanks for the documentation. (If it’s any excuse, that JavaScript detection was written before Macromedia joined Adobe…. 😉

    jd/adobe

  2. 2 thesaj January 7, 2009 at 4:31 pm

    Okay, you’re forgiven…

    However, I think you need to do penance. Here is what Saint Saj prescribes Adobe do. Many people are still using Photoshop CS2. Many of these individuals are photographers and hobbyists who do not have the coding skills to figure out what’s wrong.

    I think Adobe needs to simply post whatever bulletin/FAQ/etc, and provide a link to a new version of the .js file. So that those who do not have the programming skills to hack thru the batch generated code can simply replace that one file.

    I’m going to add my file to my blog, but it doesn’t have the hits and Google indexing that Adobe’s site does.

    😉

  3. 3 boom March 20, 2009 at 9:35 am

    Thanks SO much for this!!! This has saved me so much time. I looked everywhere for a solution to this. I appreciated just being able to download that new .js file. WHEW.

    You are brilliant.

    🙂 Boom

  4. 4 Sheila March 31, 2009 at 9:04 am

    Thank you so much for this!!! Been searching and searching the internet for this solution. You’re a life saver 🙂

  5. 5 Kef April 15, 2009 at 1:18 pm

    I’ve been pulling my hair out. Thanks!

  6. 6 Mingo May 25, 2009 at 5:24 pm

    Hi,

    I have a website of my photos and I used Motion Artist 2 for about 50 of the files – and now NONE of them will play with Flash 10.

    I’m pulling my hair out as I no longer have the source files I used to create the .swf files. I need to know how to fix the .swf files I already have loaded. Currently, when clicked on I now only get a large white space, but no flash file. Here is an example:

    http://www.bluemingophoto.com/Models-celebs/orange.htm

    Can I somehow import/revise them with Swish 12 perhaps? The files I built with that seem to still work. Is there a way possibly to convert them to something that Flash 10 reads?

    Any help is GREATLY appreciated!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




January 2009
M T W T F S S
« Nov   Apr »
 1234
567891011
12131415161718
19202122232425
262728293031