Back button in Android
I need to be able to "capture" the back button to work inside of my application. Currently, I have the following code:
stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_KeyboardDownHandler_2);
function fl_KeyboardDownHandler_2(event:KeyboardEvent):void
{
// Start your custom code
if(event.keyCode == Keyboard.BACK)
{
gotoAndPlay(1);
}
// End your custom code
}
The code works, but the application still closes. I would like to find a way to make sure the back button only works a certain way inside my application. Thanks!
