В JavaScript Flash Detection Library многое происходит , но, кажется, ее можно упростить до чего-то вроде этого:
getFlashVer: function () {
var activeXObj, plugins, plugin, result;
if (navigator.plugins && navigator.plugins.length > 0) {
plugins = navigator.plugins;
for (var i = 0; i < plugins.length && !result; i++) {
plugin = plugins[i];
if (plugin.name.indexOf("Shockwave Flash") > -1) {
result = plugin.description.split("Shockwave Flash ")[1];
}
}
} else {
plugin = "ShockwaveFlash.ShockwaveFlash";
try {
activeXObj = new ActiveXObject(plugin + ".7"), result = activeXObj.GetVariable("$version")
} catch (e) {}
if (!result) try {
activeXObj = new ActiveXObject(plugin + ".6"), result = "WIN 6,0,21,0", activeXObj.AllowScriptAccess = "always", result = activeXObj.GetVariable("$version")
} catch (e) {}
if (!result) try {
activeXObj = new ActiveXObject(plugin), result = activeXObj.GetVariable("$version")
} catch (e) {}
result && (result = result.split(" ")[1].split(","), result = result[0] + "." + result[1] + " r" + result[2])
}
return result ? result : "-";
}