Saturday, 18 October 2008

Adobe Flash 10 released

It looks like it's "sniffer-update" time again... quite a few sites seem to have 'broken' with this new release, at least in Internet Explorer.

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:

Online Marketing
Add blog to our blog directory blog search directory Blog Directory Blogarama - The Blog Directory