Flash player h.264 detection script
Does what it says on the label, Adobe has introduced h.264 codec inside Flash Player 9 Update 3 (v 9.0.115.0) this script detects if you have below that version installed/or flsh player 10 in that case wont matter (i hope, haha).
//end
//Flash player h.264 detection script//
//Flash Player 9 Update 3 (v 9.0.115.0)//
res.text += '///// h.264 detection script ///// \n\n';
//dissection
fpv = System.capabilities.version.split(" ");
fpvArray = fpv[1].split(",");
fpvCurrent = Number(fpvArray[0]+"."+fpvArray[1]);
fpvBuild = Number(fpvArray[2]);
//results
trace('flash player settings\n --- \nfpv full version = '+fpv+'\nfpv current = '+fpvCurrent+'\nfpv build = '+fpvBuild+' \n\n');
res.text += 'flash player settings\n --- \nfpv full version = '+fpv+'\nfpv current = '+fpvCurrent+'\nfpv build = '+fpvBuild+' \n\n';
function fpvXcheck(){
res.text += 'run detection\n --- \n';
trace('run detection\n---');
//fpvX version check?
fpvX = 10;
//
if (fpvCurrent>=fpvX) {
trace('flash player('+fpvX+') detected h.264 supported.');
res.text += 'flash player('+fpvX+') detected h.264 supported.';
} else {
trace('flash playerX not installed, run flash9 check?');
res.text += 'flash playerX not installed, run flash9 check?';
checkCurrent();
}
}
fpvXcheck();
function checkCurrent() {
//checkCurrent
if (fpvCurrent == "9") {
trace('\nfpv current('+fpvCurrent+') = installed');
res.text += '\nfpv current('+fpvCurrent+') = installed';
checkBuild();
} else {
trace('\nfpv current('+fpvCurrent+') = incorrect, please update flash player v(9.0.115.0) or higher. \n');
res.text += '\nfpv current('+fpvCurrent+') = incorrect, please update flash player v(9.0.115.0) or higher. \n';
}
}
function checkBuild() {
//checkBuild
if (fpvBuild>=115) {
trace('\nfpv build('+fpvBuild+') = correct \n\n*successful! flash player supports h.264');
res.text += '\nfpv build('+fpvBuild+') = correct \n\n*successful! flash player supports h.264';
} else {
trace('\nfpv build('+fpvBuild+') = incorrect version, please update flash player v(9.0.115.0) or higher. \n\n*sorry! flash player doesnt support h.264');
res.text += '\nfpv build('+fpvBuild+') = incorrect version, please update flash player v(9.0.115.0) or higher. \n\n*sorry! flash player doesnt support h.264';
}
}
//end
Labels: action script, adobe, as, detection, flash, flash player, h.264, macromedia, script