Domanda

I just made a simple game with flash professional 6.0 and the adobe AIR 4.4 SDK for iPhone.

The problem is that when I lock the iphone pressing the power button, the screen switches off as usual, but the music of the game still sounds. If I exit the game pressing the home button it exits fine. Is only when locking the phone with the app opened.

È stato utile?

Soluzione

Try add listeners for the events Event.DEACTIVATE on your main class and Event.EXITING on NativeApplication.nativeApplication.

On the events handlers you can do what you want to stop / pause your game.

Add a listener to the event Event.ACTIVATE on the main class to resume the game.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top