Adobe AIR fullscreen on launch


/ Published in: ActionScript 3
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.