Ask a Jedi: Flash Detection

Jen asks:

Do you know of a good flash detection script available, for use with flash forms? Most of the ones we have tried only detect when flash player is not installed at all. If the client system has an old version of flash there isn't an error or prompt to update - just a blank screen.

I can think of two excellent resources. The first is straight from Adobe: Flash Player Detection Kit. I've used this on a project before and it works like a charm. If you just need to check Flash players, I'd use this.

If you want to do more advanced checking, you want to consider Browserhawk. It can check everything. Seriously. It can probably tell you what the coder had for breakfast when he or she compiled your browser. It isn't cheap, but it works like a charm.

Archived Comments

Comment 1 by darron posted on 2/22/2006 at 2:05 AM

You can't talk Flash Detection and not mention FlashObject: http://blog.deconcept.com/f...

Comment 2 by Leif posted on 2/22/2006 at 2:06 AM

Give FlashObject a try:
http://blog.deconcept.com/f...

Leif

Comment 3 by Leif posted on 2/22/2006 at 2:06 AM

I am too slow for Darron

Comment 4 by Raymond Camden posted on 2/22/2006 at 2:07 AM

Sure I can - I had never heard of it. ;) Thanks for sharing this. Next time I need one for a project I'll try it.

Comment 5 by cosmin posted on 2/22/2006 at 3:24 AM

FlashObject rocks.
I recently found very useful the fact that it supports the new ExpressInstall feature in conjnction with the different codec available in f8 and f7.
Detect Flash8 -> fall to flash7 with prompt that you "could" install 8 very easy -> fall to 6.79 (the smallest ver that can handel XPI I think) with prompt that you have to install -> fall to "noflash.html" page.
And all this with very little coding :)

Comment 6 by John posted on 2/22/2006 at 8:08 AM

Let me second (or third?) the recommendation for FlashObject. It is by far the best out there.

Comment 7 by dickbob posted on 2/22/2006 at 12:47 PM

FlashObject looks good, but I can't see how it would work with CFFORM format="flash".

Is it possible?

dickbob

Comment 8 by Arjan Muthert posted on 2/22/2006 at 1:42 PM

@dickbob
Create a dummy .swf with a getURL calling your 'cfform format="flash"'.

Comment 9 by n00ge posted on 2/22/2006 at 7:00 PM

Unobtrusive Flash Objects is the best way to go for flash checks.

http://www.bobbyvandersluis...

Comment 10 by Jen posted on 2/23/2006 at 2:32 AM

Thank you, everyone! With very little tweaking, FlashObject was the ticket for our ColdFusion Flash Forms head-scratcher (yes, it is cfform format="flash"). We had already tried the Macromedia tool kit and it was a little overwhelming. FlashObject is an elegant solution and took only a few minutes to get it to work with our scenario. (HINT: I know it goes against instinct, but the readme file included in the download package is a *great* starter!) A little bit of javascript knowledge (very very little) went a long way too. :)

Thanks again - Jen

Comment 11 by dickbob posted on 2/23/2006 at 9:00 PM

Sounds great Jen, do you have an example to share? All this CFFORM Flash stuff is really new to me! I'm not sure I understand what Arjan is suggesting.

dickbob

Comment 12 by Jen posted on 2/23/2006 at 11:47 PM

Sure... Here's the basics:

Download the FlashObject package. I placed the entire folder to our beta site. I made a copy of the flashobject.html file named "foo.cfm" to use as a starting place.

I replaced the description section ("This Flash movie was embedded using...") with our cfform block. I then surrounded that form with a div element:
div id="myform"

In the header I added a javascript called hideonload:
document.getElementById('myform').style.display='none';
And invoked the function in the body tag:
body onLoad="hideonload()"

Then I changed the second parameter of the FlashObject call to "myform" (to match the div associated with the cfform block).

Now I am just working to create a simple Flash movie (with our company logo) to replace the stock swf file. When that is done, it is just a matter of changing the first parameter of the FlashObject call to match that file name, and adjusting the object size if necessary (by changing the third and fourth parameters.

The FlashObject call looks something like this:
var fo = new FlashObject("<em>name of swf file</em>", "<em>name of div element to unhide if detection is successful</em>", "<em>flash object width</em>", "<em>flash object height</em>", "<em>flash version</em>", "<em>flash object background color</em>");

Hope that helps!

~Jen

Comment 13 by dickbob posted on 2/24/2006 at 2:24 AM

Thanks Jen, that'll get me started!

dickbob