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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top