View Full Version : Javascript Flash Detect

05-10-2007, 06:19 PM
My situaition is as follows:

I have been asked to create a javascript based on jQuery that creates a link in a web page to an external site. This link, when clicked, should cause an iFrame to be added to the page and for an off-site page with a flash movie loaded into the iFrame.

I have managed to build something using jQuery that accomplishes this part, but the other piece of the puzzle is proving tricky.

The hyperlink that triggers the loading of the external page into the iframe should only appear if Flash is installed, if it is not then the hyperlink should be absent. This basically means that I need to know whether or not the correct version of Flash is instealled before any Flash movies have actually been loaded.

My solution should, if possible, not rely on a hidden Flash movie. If possible it should be a pure HTML/JavaScript solution. It should also be completely unobtrusive, if Flash is not available then the hyperlink should simply not appear.

I looked at the Flash plugin for jQuery, because it claims to do flash detection but as far as I can tell it only does Flash detection when you attempt to load a Flash movie. This is too late as I need to know before hand if Flash is available. Besides, a flash player plugin seems like overkill, just a simple function that returns true or false depending on whether or not the required version of Flash player is installed will do.

05-10-2007, 10:39 PM

05-11-2007, 04:29 PM
The results I got doing that all depended on an invisible movie. I did manage to find a script that did what I wanted in the end though.