Mazatec
Mazatec

Reputation: 11649

how to detect flash using SWFObject

I have downloaded SWFObject, and included it in my website. Now I want to simply get a true or false value based on whether or not Flash is installed in the users browser when they visit my site.

How can I do this?

Upvotes: 14

Views: 11923

Answers (2)

cachaito
cachaito

Reputation: 343

If You use jQuery SWFObject you could use:

if (!$.flash.hasVersion('9')) {
 //has Flash
}
else {
 //no_flash
}

Upvotes: 1

andynormancx
andynormancx

Reputation: 13762

if (swfobject.hasFlashPlayerVersion("9.0.18")) {
  // has Flash
}
else {
  // no Flash
}

or replace "9.0.18" with the minimum version you require

Upvotes: 27

Related Questions