Why does my gesture_swipe not work twice?
I have a game in which the user has to draw his pistol and then shoot targets. The user draws their pistol with an upward swipe on the screen (and can only do so once). The drawn boolean is to stop the user swiping twice. I have also removed the gesture swipe from the stage after it has been used once as an extra 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, my issue is, that when I send the player back around to the start of the game, they can no longer draw. No error, nothing, the function is just unresponsive.
If anyone has any ideas why this may be, that would be great, thank you.
(or any questions)
Thank you
