Here's a quick way of detecting the Flash version using ActiveXObject:
function testFlashIE() {
var flashMajor=0;
var flashInstalled=false;
try {
flAXO = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
flVersion = flAXO.GetVariable("$version");
flMajor = flVersion.substring(
flVersion.indexOf(" ")+1,
flVersion.indexOf(","));
flashInstalled=true;
flashMajor=flMajor;
}
catch (e) {} // ignore
if (!flashMajor) {
// here comes the usual flash detection loop
// for older versions
// ...
}
return flashInstalled?flashMajor:null;
}
Thoughts?
No comments:
Post a Comment