Checking the Player Type : System.Capabilities : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » System.Capabilities »

 

Checking the Player Type


 
Possible values are PlugIn, ActiveX, StandAlone, and External.

package{
  import flash.display.Sprite;
  import flash.system.Capabilities;
  public class Main extends Sprite{
    public function Main(){

        if(flash.system.Capabilities.playerType == "Plugin") {
          trace("do actions for Mozilla, etc. browsers");
        }
        else if(flash.system.Capabilities.playerType == "ActiveX") {
          trace("do actions for IE");
        }
        else {
          trace("do actions for no browser");
        }

    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Development
» System.Capabilities