2 Replies Latest reply on Apr 5, 2008 6:35 AM by duncanhall

    Manual for AIR

    DanelKirch Level 1
      Ok, i have been sitting here and trying to find livedocs or manual for air but without any luck.

      I followed up a tutorial and made everything exactly as show and told but i still get errors.

      Where can i find Code list for air, i mean codes that work with Air ?

      The problem that i ran into is this one:

      close.addEventListener(MouseEvent.MOUSE_DOWN, doClose);
      function doClose(e:MouseEvent):void{

      And the error (is about strage.window.close() )

      1119: Access of possibly undefined property window through a reference with static type flash.display:Stage.
        • 1. Re: Manual for AIR
          Dr. Fred Mbogo Level 1
          The error says that the object 'stage' doesn't have a property 'window'. And if I open the Help in Flex Builder and do a search for 'stage', I come to the reference for 'flash.display.Stage', and indeed, there is no 'window' property. This answers your other question: the manual is inside Flex Builder. 60 seconds of googling and poking around on Adobe's site says the online version of this is here: http://www.adobe.com/support/documentation/en/air/

          If I had to guess how to close the main window programmatically, it would be:


          from within the WindowedApplication scope, or:


          from anywhere else in the program.

          Also, you don't have to define the function separately in this instance. That's procedural thinking. ActionScript has first-class functions:

          close.addEventListener(MouseEvent.MOUSE_DOWN, function (e:MouseEvent):void { this.nativeWindow.close(); });
          • 2. Re: Manual for AIR
            Alternatively, if you're not a Flex user, the livedocs can be found here:


            And you would want to replace ' Application' in the above post to ' NativeApplication'.


            NativeApplication.nativeApplication.activeWindow.close(); - Closes the active window

            NativeApplication.nativeApplication.exit() - Exits the application