Leopard breaks the Flash Player - the double fix

Apple’s new OS X Leopard causes Adobe’s Flash player to toss its cookies whenever Flash tries to access the local file system in the normal way. The result is that sites with Flash-based file upload tools (like Flickr) are scrambling to figure out how to handle Leopard users in a nice way. Here are two fixes: one for Leopard users, and the other for publishers trying to accommodate Leopard users.

The fix for Leopard users is easy and has been documented in several places online in the last week, including Ars Technica. There’s a special flash player update from Adobe labs that you can download here (you’ll want to click “Download Plugin for Mac OS X 10.2 and above”). Adobe does recommend that you use their Flash player uninstaller before you run the update. After you complete the update, your Flash player version should be at least 9.0.98.

One applicable bit of trivia: my friend just purchased a Macbook with Leopard preinstalled. His version 9.0.47 of the Flash player worked normally. I’m guessing that Flash player version 9.0.47 is only breaking down when users upgrade to Leopard from an older version of OS X.

The fix for publishers is a little more involved. You need to detect Leopard users and then help them get the special Flash player update they need. I’m going to use Faceplanting, my recently launched online game as an example. Faceplanting uses Flash in two separate places. First, there’s the “Make” page where you upload your picture and create your own Faceplanting page. Second, there’s the actual Faceplanting page where you and your friends morph (aka Faceplant) your face, and save the results. This second page is unaffected by the clash between Leopard and Flash. For instance, if you visit George Bush’s Faceplanting page without the special Flash player update I mentioned above, you’ll see it works just fine.

It’s only the Flash-based file upload functionality on the “Make” page that needs special attention. I used javascript to detect OS X users that have a Flash player version lower than 9.0.98, but I didn’t want to redirect them, I just wanted to show a small message near that top that greets them with a link to the fix.

Here’s the rub: there’s absolutely no way to detect if the OS X user is on Leopard or not. This is because the user agent reported in the browser has no special version, it just reports “Mac OS X” whether that user is on Leopard or an older version of OS X. So the best I could do was add a linked message that says “Howdy Mac Lover! If you’re using Leopard, you may need a special upgrade for your flash player.” I had this message link to an upgrade page which walks people through upgrading their Flash.

My javascript is in a file called leopardtest.js and I added it to the html of the Make page where I wanted the alert message to show up. You’ll notice that my script taps into the functionality of SWFObject 1.5, which is the most widely used tool for embedding Adobe Flash content. This means I also needed to include swfobject.js in the Make page head so its functions would be available to my leopardtest.js (I already had swfobject.js in there because I was using it to embed the page’s flash content).

To see how the working code looks, view the browser source of Faceplanting’s Make page. You can also go straight to the leopardtest.js.


About this entry

Share this post:
  • digg
  • del.icio.us
  • Reddit
  • NewsVine
  • YahooMyWeb