actionscript 3 - Back button for android is not working for apk file -


i using flash cs6 create android app. trying code button. works when run file in flash after published out handphone, button brings me page 3 page 1 instead of page 3 page 2. doing coding in frame , not class.

the code have used below:

import flash.events.mouseevent; import flash.events.keyboardevent; import flash.desktop.nativeapplication;  stop(); nativeapplication.nativeapplication.addeventlistener(keyboardevent.key_down, onkeydownhandler159)  function onkeydownhandler159(event:keyboardevent):void {     if( event.keycode == keyboard.back)     {          event.preventdefault();          event.stopimmediatepropagation();          nativeapplication.nativeapplication.removeeventlistener(keyboardevent.key_down, onkeydownhandler159);          gotoandstop (14);          nativeapplication.nativeapplication.addeventlistener(keyboardevent.key_down, onkeydownhandler159)     } } 

try using keyboardevent.key_up rather key_down. key down can interpreted in different ways, on mobile device. i've never had issues key up


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -