/ Published in: ActionScript 3
Allows for EXIT function on mobile device via mobile device BACK key button.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//ITS THE RIVERA ERA //THE FIRST PUERTO RICAN URBAN AMERICAN DEVELOPER import flash.events.Event; import flash.events.KeyboardEvent; stage.addEventListener(Event.ENTER_FRAME, handlekeys); function handlekeys(event: KeyboardEvent):void { if (event.keyCode == Keyboard.BACK) { NativeApplication.nativeApplication.exit(); } }