IOS AIR应用程序仍在运行,当iPhone被锁定? [英] IOS AIR app still running when the iphone is locked?

查看:148
本文介绍了IOS AIR应用程序仍在运行,当iPhone被锁定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是做与一个简单的游戏,Flash Professional中6.0 的Adobe AIR 4.4 SDK的iPhone。

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

现在的问题是,当我锁定iphone pressing电源键,屏幕像往常一样关闭,但游戏的音乐还是声音。如果我退出游戏pressing home键退出罚款。被锁定与打开的应用程序的手机,只有当。

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.

推荐答案

拉升事件 Event.DEACTIVATE 在主类中添加监听器和静态] Event.EXITING 的NativeApplication.nativeApplication

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.

添加一个监听到事件 Event.ACTIVATE 的主类,以恢复比赛。

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

这篇关于IOS AIR应用程序仍在运行,当iPhone被锁定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆