【发布时间】:2013-03-27 15:10:15
【问题描述】:
在我的 AIR AS3 应用程序中,我试图像这样覆盖后退按钮:
NativeApplication.nativeApplication.addEventListener( KeyboardEvent.KEY_DOWN, onKey );
private function onKey(e:KeyboardEvent):void
{
if (e.keyCode == Keyboard.BACK)
{
//stage.addChild(new MainMenuScreen());
//stage.removeChild(this);
//removeEventListener(KeyboardEvent.KEY_DOWN, onKey);
}
}
在我看来,我的代码已经完成,但默认的 Android 行为(应用程序已关闭) 也会执行。
有人遇到过这个问题吗?
【问题讨论】:
-
不要更改默认行为。
-
希望这个链接可以帮助你。 stackoverflow.com/questions/15549669/…
标签: android actionscript-3 flash air adobe