title: How to detect flash player version by js
body: <p>This function always return <code>"0"</code> in IE</p>
  
  <pre><code>function getFlashVersion(){
   var flash = 'None';
   // Count down from 10.
   for(var i = 10; i &gt; 0; i--)
   {
     try{
      flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+String(i));
     }catch(e){
       //console.log(e);
     }
     if(flash != 'None')
      return flash.GetVariable("$version");
  
   }
   return 0;
  }
  </code></pre>
  
  <p>but chrome return <code>11.8.r800</code></p>
  
  <p>how to detect flash player version in IE.</p>