Posted By

ozke on 08/25/11


Tagged

fullscreen AIR adobe launch


Versions (?)

Adobe AIR fullscreen on launch


 / Published in: ActionScript 3
 

Taken from here: http://blog.ochodurando.com/2010/04/adobe-air-e-fullscreen/

  1. public function Main():void {
  2. NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvoke);
  3. ...
  4. }
  5. private function onInvoke(event:InvokeEvent):void {
  6. toggleFullScreen();
  7. stage.scaleMode = StageScaleMode.NO_SCALE;
  8. stage.align = StageAlign.TOP_LEFT;
  9. ...
  10. }
  11. private function toggleFullScreen():void {
  12. stage.displayState = ( stage.displayState == StageDisplayState.FULL_SCREEN_INTERACTIVE ) ?
  13. StageDisplayState.NORMAL :
  14. StageDisplayState.FULL_SCREEN_INTERACTIVE;
  15. }

Report this snippet  

You need to login to post a comment.