function testPlayerVersion() {
        var b = doc.getElementsByTagName("body")[0];
        var o = createElement(OBJECT);
        o.setAttribute("style", "visibility: hidden;");
        o.setAttribute("type", FLASH_MIME_TYPE);
        var t = b.appendChild(o);
        if (t) {
            var counter = 0;
            (function checkGetVariable() {
                if (typeof t.GetVariable !== UNDEF) {
                    try {
                        var d = t.GetVariable("$version");
                        if (d) {
                            d = d.split(" ")[1].split(",");
                            ua.pv = [toInt(d[0]), toInt(d[1]), toInt(d[2])];
                        }
                    } catch (e) {
                        //t.GetVariable("$version") is known to fail in Flash Player 8 on Firefox
                        //If this error is encountered, assume FP8 or lower. Time to upgrade.
                        ua.pv = [8, 0, 0];
                    }
                } else if (counter < 10) {
                    counter++;
                    setTimeout(checkGetVariable, 10);
                    return;
                }
                b.removeChild(o);
                t = null;
                matchVersions();
            })();
        } else {
            matchVersions();
        }
    }
/* Detect the Flash Player version for non-Internet Explorer browsers
        - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
          a. Both release and build numbers can be detected
          b. Avoid wrong descriptions by corrupt installers provided by Adobe
          c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
        - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
    */
Detect the Flash Player version for non-Internet Explorer browsers
Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
a. Both release and build numbers can be detected
b. Avoid wrong descriptions by corrupt installers provided by Adobe
c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
Detect the Flash Player version for non - Internet Explorer browsers Detecting the plug - in version via the object element is more precise than using the plugins collection item ' s description : a . Both release and build numbers can be detected b . Avoid wrong descriptions by corrupt installers provided by Adobe c . Avoid wrong descriptions by multiple Flash Player entries in the plugin Array caused by incorrect browser imports Disadvantage of this method is that it depends on the availability of the DOM while the plugins collection is immediately available
function testPlayerVersion() {
        var b = doc.getElementsByTagName("body")[0];
        var o = createElement(OBJECT);
        o.setAttribute("style", "visibility: hidden;");
        o.setAttribute("type", FLASH_MIME_TYPE);
        var t = b.appendChild(o);
        if (t) {
            var counter = 0;
            (function checkGetVariable() {
                if (typeof t.GetVariable !== UNDEF) {
                    try {
                        var d = t.GetVariable("$version");
                        if (d) {
                            d = d.split(" ")[1].split(",");
                            ua.pv = [toInt(d[0]), toInt(d[1]), toInt(d[2])];
                        }
                    } catch (e) {
                        ua.pv = [8, 0, 0];
                    }
                } else if (counter < 10) {
                    counter++;
                    setTimeout(checkGetVariable, 10);
                    return;
                }
                b.removeChild(o);
                t = null;
                matchVersions();
            })();
        } else {
            matchVersions();
        }
    }
function testPlayerVersion ( ) { var b = doc . getElementsByTagName ( "body" ) [ 0 ] ; var o = createElement ( OBJECT ) ; o . setAttribute ( "style" , "visibility: hidden;" ) ; o . setAttribute ( "type" , FLASH_MIME_TYPE ) ; var t = b . appendChild ( o ) ; if ( t ) { var counter = 0 ; ( function checkGetVariable ( ) { if ( typeof t . GetVariable !== UNDEF ) { try { var d = t . GetVariable ( "$version" ) ; if ( d ) { d = d . split ( " " ) [ 1 ] . split ( "," ) ; ua . pv = [ toInt ( d [ 0 ] ) , toInt ( d [ 1 ] ) , toInt ( d [ 2 ] ) ] ; } } catch ( e ) { ua . pv = [ 8 , 0 , 0 ] ; } } else if ( counter < 10 ) { counter ++ ; setTimeout ( checkGetVariable , 10 ) ; return ; } b . removeChild ( o ) ; t = null ; matchVersions ( ) ; } ) ( ) ; } else { matchVersions ( ) ; } }
Detect the Flash Player version for non-Internet Explorer browsers
 Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
a.
Detect the Flash Player version for non - Internet Explorer browsers Detecting the plug - in version via the object element is more precise than using the plugins collection item ' s description : a .
//t.GetVariable("$version") is known to fail in Flash Player 8 on Firefox //If this error is encountered, assume FP8 or lower. Time to upgrade.