Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Android apk game close issue.

Explorer ,
Jun 02, 2013 Jun 02, 2013

Hi I have made flash android game, here is issue is, client need a button to close this game, and other option is if user clicks on home botton on tab/Ipad then game must be pause,

right now if user minimise the app it's sound still playing and everything working as it is. How can I capture that user that user minimise the app.

TOPICS
ActionScript
1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jun 04, 2013 Jun 04, 2013

Thanks for reply kglad,

I already read this before posting this issue, this is not mention on any official page of adobe, but I did it,

I close app on pressing back key and home key,

NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE,gameclose)  << on pressing homekey

NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, handleKeys)  <<on pressing back arrow key

private function gameclose(event:Event):void{

     NativeApplication.nativeApplication.exit();

}

priv

...
Translate
Community Expert ,
Jun 03, 2013 Jun 03, 2013
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 04, 2013 Jun 04, 2013

Thanks for reply kglad,

I already read this before posting this issue, this is not mention on any official page of adobe, but I did it,

I close app on pressing back key and home key,

NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE,gameclose)  << on pressing homekey

NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, handleKeys)  <<on pressing back arrow key

private function gameclose(event:Event):void{

     NativeApplication.nativeApplication.exit();

}

private function handleKeys(event:KeyboardEvent):void{

     if(event.keyCode == Keyboard.BACK)

     NativeApplication.nativeApplication.exit();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 04, 2013 Jun 04, 2013
LATEST

both of those events are suggested in the adobe link i posted.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines