1 Reply Latest reply on Feb 21, 2011 10:53 PM by Flex harUI

    Native Window EventListeners?


      I have my AIR app automatically opening at fullscreen:


      private  function toggleFullScreen():void {     
           stage.displayState = ( stage.displayState == StageDisplayState.FULL_SCREEN_INTERACTIVE ) ?
           StageDisplayState.NORMAL : StageDisplayState.FULL_SCREEN_INTERACTIVE;


      The problem is, because this function is invoked by a eventListener in my "onComplete" function, when the user presses escape to bring the app out of FULL_SCREEN mode, there is no way to go back into FULL_SCREEN mode without having a fullscreen button included in the application. 


      I was wondering if it is possible to have an eventListener on the native (OS X) window maximize button ("+") so that it calls the toggleFullScreen function to go back into FULL_SCREEN mode?