I have found one thread regarding this, but it suggests a javascript solutiuon that I’m keen to avoid as I don’t really know any java.
Ok my problem is that I am creating an animation for a web page, it is done in flashMX as some of the animations are actionscript controlled. What I thought I’d do was have an opening animation which would be flash4 (which would be purely motion tweens etc) and then I would load my flash5 checker, which would check which version and doing something like
if(version!==6) { do something}
presumably then if they only had 4, nothing would load on top of the original flash4 animation, if it was flash5 it would ‘do something’ and if it was flash6 it would carry on as it was supposed to.
Altho if someone has a less convoluted solution, I would be gald to hear it.
That is tough… personaly I like the Flash redirection method used by the Flash developer kit availiable from macromedia. It has all the javascript’s included and does the whole thing for you.
It does take some reading though to understand how to set it up correctly.
What is the current Flash 5.0 detection you’re using?
I have done the macromedia detection before, and whilst it is a little fiddly, I managed it (and it even works - altho I’m not sure that I ever got it to do the nice pop up installer that you sometimes eee on professional sites)
I jumped the gun a bit on the flash 5 checker, unfortunately my flash5 ‘machine’ is in a different place, so I just presumed I’d be able to do it. Will check later on.
What I will try next week (when I’m back at the office) is this flash 4 animation loading the flash 5/6 after it, then test it on a machine (which only has flash 4 or 5 installed) to see if the loaded animation which would play blank obscures the flash 4 loader.
This kind of problem really highlights a major headache, keeping track of versions, and managing a group of older machines with different combinations of OS, browser and plug-ins.
I know what you mean. Most of these guys don’t worry about such things, but my fiance is a pro so we’re ALWAYS working on version detection/redirection.
My colleague sent me this which does the checking in js, itis copied from elsewhere (copyrights and where froms are shown) but it does at least show how you could do it (in javascriopt)
var flashVersion = 0;
function getFlashVersion() {
var agent = navigator.userAgent.toLowerCase();
// NS3 needs flashVersion to be a local variable
if (agent.indexOf(“mozilla/3”) != -1 && agent.indexOf(“msie”) == -1) {
flashVersion = 0;
}
// NS3+, Opera3+, IE5+ Mac (support plugin array): check for Flash plugin in plugin array
if (navigator.plugins != null && navigator.plugins.length > 0) {
var flashPlugin = navigator.plugins['Shockwave Flash'];
if (typeof flashPlugin == 'object') {
if (flashPlugin.description.indexOf('7.') != -1) flashVersion = 7;
else if (flashPlugin.description.indexOf('6.') != -1) flashVersion = 6;
else if (flashPlugin.description.indexOf('5.') != -1) flashVersion = 5;
else if (flashPlugin.description.indexOf('4.') != -1) flashVersion = 4;
else if (flashPlugin.description.indexOf('3.') != -1) flashVersion = 3;
}
}
// IE4+ Win32: attempt to create an ActiveX object using VBScript
else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
document.write('<scr' + 'ipt language="VBScript"\>
');
document.write('on error resume next
');
document.write('dim obFlash
');
document.write('set obFlash = CreateObject(“ShockwaveFlash.ShockwaveFlash.7”)
');
document.write('if IsObject(obFlash) then
');
document.write('flashVersion = 7
');
document.write('else set obFlash = CreateObject(“ShockwaveFlash.ShockwaveFlash.6”) end if
');
document.write('if flashVersion < 7 and IsObject(obFlash) then
');
document.write('flashVersion = 6
');
document.write('else set obFlash = CreateObject(“ShockwaveFlash.ShockwaveFlash.5”) end if
');
document.write('if flashVersion < 6 and IsObject(obFlash) then
');
document.write('flashVersion = 5
');
document.write('else set obFlash = CreateObject(“ShockwaveFlash.ShockwaveFlash.4”) end if
');
document.write('if flashVersion < 5 and IsObject(obFlash) then
');
document.write('flashVersion = 4
');
document.write('else set obFlash = CreateObject(“ShockwaveFlash.ShockwaveFlash.3”) end if
');
document.write('if flashVersion < 4 and IsObject(obFlash) then
');
document.write(‘flashVersion = 3
‘);
document.write(‘end if’);
document.write(’</scr’ + 'ipt>
');
}
// WebTV 2.5 supports flash 3
else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;
// older WebTV supports flash 2
else if (agent.indexOf("webtv") != -1) flashVersion = 2;
// Can't detect in all other cases
else {
flashVersion = flashVersion_DONTKNOW;
}
return flashVersion;