Monday, September 3, 2012

Detecting the Operating System

Detecting the Operating System: Use the flash.system.Capabilities.os property

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

        var os:String = flash.system.Capabilities.os.substr(03);
        if (os == "Win") {
          trace("Windows-specific code goes here");
        else if (os == "Mac") {
          trace("Mac-specific code goes here");
        else {
          trace("Must be Unix or Linux");


ref : -

1 comment:

  1. Flex Developer in India- Get the cheap and best flex developer, flex designer, flex application developer, flex application development, flex application design and much more at We also outsource flex work to freelancers.