Today I studied some Flex technology and made a small demo. During the test, I found that the errors often occurred. After checking online, I found that it was caused by the low version of the browser Flash Player (requires 10 and above). In this regard, I summarized the method of judging browser Flash Player information with JavaScript scripts:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>JavaScript determines browser Flash Player information</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <script type="text/javascript"> function checkFlashPlayer(){ var hasFlashPlayer=0; //Judges whether Flash Player var flashPlayerVersion=0; //Flash Player version if(document.all){ var shockWaveFlash = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); if(shockWaveFlash) { hasFlashPlayer=1; flashPlayerVersion=parseInt(shockWaveFlash.GetVariable("$version").split(")[1].split(",")[0]); } }else if (navigator.plugins && navigator.plugins.length > 0){ var shockWaveFlash=navigator.plugins["ShockwaveFlash"]; if (shockWaveFlash){ hasFlashPlayer=1; var descriptionInfo = shockWaveFlash.description.split(" "); for (var i = 0; i < descriptionInfo.length; ++i){ if (isNaN(parseInt(descriptionInfo[i]))){ continue; } flashPlayerVersion = parseInt(descriptionInfo[i]); } } } return {hasFlashPlayer:hasFlashPlayer, flashPlayerVersion:flashPlayerVersion}; } if(checkFlashPlayer().hasFlashPlayer){ if(checkFlashPlayer().flashPlayerVersion <= 10){ if(confirm("Your Flash Player version is too low, upgrade the Flash Player version immediately? ")){ window.location.href="http://get.adobe.com/cn/flashplayer/" rel="external nofollow" rel="external nofollow" ; } }else{ alert("You have installed Flash Player, the current Flash Player version number is: "+checkFlashPlayer().flashPlayerVersion+"."); } }else{ if(confirm("You did not install Flash Player, install it now?")){ window.location.href="http://get.adobe.com/cn/flashplayer/" rel="external nofollow" rel="external nofollow" ; } } </script> </head> <body> </body> </html>