how to detect flash using SWFObject

Mazatec picture Mazatec · Apr 19, 2011 · Viewed 11.9k times · Source

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?

Answer

andynormancx picture andynormancx · Apr 19, 2011
if (swfobject.hasFlashPlayerVersion("9.0.18")) {
  // has Flash
}
else {
  // no Flash
}

or replace "9.0.18" with the minimum version you require