views:

3195

answers:

7

Does anyone have an example of script that can work reliably well across IE/Firefox to detect if the browser is capable of displaying embedded flash content. I say reliably because I know its not possible 100% of the time.

+3  A: 

Perhaps adobe's flash player detection kit could be helpful here?

http://www.adobe.com/products/flashplayer/download/detection_kit/

Joeri Sebrechts
+15  A: 

SWFObject is very reliable. I have used it without trouble for quite a while.

Max Stewart
Same here, SWFObject works great for me as well (used to be called FlashObject, but Adobe threw a hissy fit)
davr
SWFObject is the way to go!
Sugendran
A: 

well... If you want to detect this, you need javascript, right? And if neither flash or js is enabled/available... you are screwed :D Anyhow, i think the best thing is to use swfObject or something similar :)

Ionut Staicu
A: 

I've used the following at http://whatsmy.browsersize.com and it works fine across FF/IE/Safari/Opera/Chrome:

http://developer.apple.com/internet/webcontent/examples/detectplugins_source.html

Ates Goral
+1  A: 

Carl Yestrau's JavaScript Flash Detection Library, here:

http://www.featureblend.com/javascript-flash-detection-library.html

... may be what you're looking for.

Kent Brewster
+3  A: 

Detecting and embedding Flash within a web document is a surprisingly difficult task.

I was very disappointed with the quality and non-standards compliant markup generated from both SWFObject and Adobe's solutions. Additionally, my testing found Adobe's auto updater to be inconsistent and unreliable.

The JavaScript Flash Detection Library (Flash Detect) and JavaScript Flash HTML Generator Library (Flash TML) are a legible, maintainable and standards compliant markup solution.

-"Luke read the source!"

A: 

To create a Flash object standart-compliant (with JavaScript however), I recommend you take a look at

Unobtrusive Flash Objects (UFO)

http://www.bobbyvandersluis.com/ufo/index.html

Stephan Kristyn