interessant detect ....
men den virker vist ikkeden viser ihvertfald på min PC IE at jeg har 6,0,0,0 men mangler 6,0,65,0
---
// set required version here:
required_version = "6,0,0,0"
// FYI: flash 6 versions below 6,0,47,0
// have issues with controlling streaming mp3's
// specifically "stop" and "start"
//
// that's why i had to build yet another
// flash version checker... i do believe that
// this is the last one you will ever need...
//
// it is future proof.
//
// this should be in frame 1
// copy and paste this frame only
//
// "frame" copy and paste:
// select this frame on the timeline
// ctrl+alt+c
// select from 1 of your movie
// ctrl+alt+v
//
// --------------------------
// do not edit below here
// unless you know what you are doing!
// --------------------------
//
// tell the movie to stop...
stop();
// get version
actual_version = eval("$version");
see = actual_version
actual_version_length = length(actual_version);
while (i<=actual_version_length) {
i = i+1;
version_temp = substring(actual_version, i, 1);
if (version_temp eq " ") {
version_platform = substring(actual_version, 1, i-1);
version_majorVersion = substring(actual_version, i+1, 1);
version_secondHalf = substring(actual_version, i+1, actual_version_length-i);
version_minorVersion = substring(version_secondHalf, 5, 2);
}
}
// check for flash 4
if (version_majorVersion eq "4") {
flashcheck = "no";
allowContinue = "no";
verdict = "mp3 streamer requires flash upgrade";
}
// check for flash 5
if (Number(version_majorVersion)>=Number(5)) {
flashcheck = "yes";
} else {
flashcheck = "no";
allowContinue = "no";
verdict = "mp3 streamer requires flash upgrade";
}
// check for all versions higher than 5
if (flashcheck == "yes") {
// start this "split" after the space between the system and version number
// since "unix" is longer than "win" and "mac" we need to do a couple of splits
// examples:
// MAC 6,0,24,0
// WIN 6,0,21,0
// UNIX 5,0,2,0
split_on_space = actual_version.split(" ");
// Aa means Array Actual (version)
// put actual version into an array
Aa = split_on_space[1].split(",");
// Ar means Array Required (version)
// put required version into an array
Ar = required_version.split(",");
// now we have 2 arrays:
// actual:
// Aa = [6,0,31,0]
// required:
// Ar = [6,0,47,0]
// each having 4 elements
//
// now we want to compare each element... numerically.
//
// here we have a nice checking procedure that
// starts at the major version, if everything
// is cool at the major version stage, then we
// will step down to check revision versions.
//
for (i=0; i<Ar.length; i++) {
if (Number(Aa[i])>=Number(Ar[i])) {
versioncheck = "pass";
allowContinue = "yes";
verdict = "mp3 streamer powered by";
} else {
// if at any time a set of numbers don't jive
// break out of this "for" loop, and issue your
// "failure" statement - or verdict
allowContinue = "no";
verdict = "mp3 streamer requires flash upgrade";
version_bad_guy_id = i
break;
}
}
//
// this next section is done so that you can
// print the info out, if you so desire.
//
// point to the "bad guy"
Abad_guy = new Array("version", "version minor", "revision", "revision minor")
version_bad_guy = Abad_guy[version_bad_guy_id]
//
// refabricate the version info (sans platform info)
actual_version = Aa.join(",");
required_version = Ar.join(",");
}
// if everything is cool, just keep on moving...
// this should be as transparent as possible
// just tell the movie to start playing again
if (allowContinue == "yes") {
// this if statement will allow you to
// come back an check... like on the demo
if(!version_test){
//play();
this.gotoAnStop(this._currentframe+1);
}
}
// ---------------------------
// by mike gieson
// www.gieson.com
// ---------------------------
----
comments anyone ?
