These two days work need to embed flash games in the webpage, I use Swfobject.js version:1.5. Other aspects are very good, only version detection here has been no straightened out, and then really helpless, use JS to detect the browser Flash plug-in situation, the code is as follows:
<script>functionFlashchecker () {varHasflash = 0;//whether the Flash is installed varflashversion = 0;//Flash version if(document.all) {varSWF =NewActiveXObject (' Shockwaveflash.shockwaveflash '); if(SWF) {Hasflash= 1; vswf= swf. GetVariable ("$version"); Flashversion= parseint (Vswf.split ("") [1].split (",") [0]); } } Else { if(navigator.plugins && navigator.plugins.length > 0) { varswf = navigator.plugins["Shockwave Flash"]; if(SWF) {Hasflash= 1; varWords = Swf.description.split (""); for(vari = 0; i < words.length; ++i) {if(IsNaN (parseint (words[i)))Continue; Flashversion=parseint (Words[i]); } } } } return{f:hasflash, v:flashversion}; } varFLS =Flashchecker (); vars = ""; if(FLS.F) document.write ("You have Flash installed, the current Flash version is:" + fls.v + ". X"); Elsedocument.write ("You do not have Flash installed"); </script>
JS detects if the Flash Player plugin is installed in the browser