hwg-techniques archives | Oct 2000 | new search | results | previous | next |
Detecting Flash 4by Gregor Pirnaver <gregor.pirnaver(at)email.si> |
|
I use the following JavaScript in BODY of HTML to detect Flash & it works. if ((navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("Mac") == -1 && navigator.appVersion.indexOf("3.1") == -1) || (navigator.plugins && navigator.plugins["Shockwave Flash"]) || navigator.plugins["Shockwave Flash 2.0"]) flash = true; ... but how to detect Flash 4 (!) with JavaScript? I tried the following script but it dosen't work... var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0); if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 4) flash = true; -- Gregor
HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA