Detect Flash from Javascript

Posted by & filed under Javascript.

var hasFlash = false;
try {
    var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
    if(fo) hasFlash = true;
}catch(e){
    if(navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) hasFlash = true;
}

Credit to someone on Stackoverflow.com! Can’t find the reference anymore.

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Bitnami