Why does my gesture_swipe not work twice?


i have game in user has draw pistol , shoot targets. user draws pistol upward swipe on screen (and can once). drawn boolean stop user swiping twice. have removed gesture swipe stage after has been used once precaution.

 

stage.addeventlistener(transformgestureevent.gesture_swipe, onstageswipedraw);

function onstageswipedraw (e:transformgestureevent):void {

                if (drawn == false) {

                                if (e.offsety == -1) {

                                                pistol_mc.gotoandplay("drawgun");

                                                drawn = true;

                                                removeswipelisteners();

                                }

                }

}

 

//remove listeners

function removeswipelisteners ():void {

          stage.removeeventlistener(transformgestureevent.gesture_swipe, onstageswipedraw);

}

 

 

basically, issue is, when send player around start of game, can no longer draw. no error, nothing, function unresponsive.

 

if has ideas why may be, great, thank you.

(or questions)

 

thank you

where variable drawn reset?



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account