Disable Default function of "Back" button for Android.
hi there!
i have tried many methods prevent default function of back button in android no success
this 1 of codes have used no success:
stage.addeventlistener(keyboardevent.key_up, optionskey, false, 0, true);
function optionskey(ke:keyboardevent):void
{
if (ke.keycode == keyboard.back)
{
ke.preventdefault();
ke.stopimmediatepropagation();
//do own code below...
}
}
i using flash cs6 , air 3.2 android , testing on lg google nexus 4.
when use flash simulator, works fine! means button, let app go previous step (as expect do)
but after publish apk (aspect ratio: auto , auto orientation , render mode: gpu), press back, minimize app!
(means when press button on phone, app minimize down (not close!). when re-activate it/click on it, see app has gone 1 step (as programmed , expected), cant stop the default action of minimizing/de-activating my app after pressing back button.
anyone have "fla" file can see in action please?!
because have used many-many codes , no success yet
thanks , looking forward kind of hlep...
message edited by: pouradam
no answer???? ....
More discussions in ActionScript 3
adobe
Comments
Post a Comment