1 Reply Latest reply on Apr 8, 2008 11:19 AM by Dr. Fred Mbogo

    How can test if I'm in an AIR context?

    Graeme Harker Level 1
      I am developing an application in Flex that will be deployed both as a traditional Flex web application and as an AIR desktop. The code is largely shared between the two projects in one big Flex Class Library. In some cases the code needs to do one thing if it's running in the context of a web app and another thing if it's running in the context of an AIR application. Is there an easy programatic test I can make from Flex that will tell me what context I'm in?

      Such as...

      if (System.Capabilities.isAIR)
      {
      new Window().open();
      }
      else
      {
      this.model.viewState = Model.NEW_VIEW;
      }