سلام
باید رویداد activate از کلاس NativeApplication رو شنود کنید.
[PHPS]
NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, handleActivate, false, 0, true);
NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, handleDeactivate, false, 0, true);
function handleActivate(event:flash.events.Event):void
{
//here save your games state.
//then stop ALL sound from playing with the following line:
trace("ACTIVATE")
//Remember to import flash.media.SoundMixer;
}
function handleDeactivate(event:flash.events.Event):void
{
//here you start the sounds again, for example:
trace("DEACTIVATE")
}[/PHPS]
با تشکر