/ Published in: ActionScript 3
Taken from here: http://blog.ochodurando.com/2010/04/adobe-air-e-fullscreen/
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public function Main():void { NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvoke); ... } private function onInvoke(event:InvokeEvent):void { toggleFullScreen(); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; ... } private function toggleFullScreen():void { stage.displayState = ( stage.displayState == StageDisplayState.FULL_SCREEN_INTERACTIVE ) ? StageDisplayState.NORMAL : StageDisplayState.FULL_SCREEN_INTERACTIVE; }