I am having some real difficulties getting any sort of consistent input behaviour when I try to mix Gestures and just tapping a button. (Using Flash Develop, Flash Professional CC and AIR 3.9 v.1030 )
I have a movie clip in upper half of screen that has an event listener for the SWIPE gesture. Then I have buttons in bottom of screen listening for Mouse CLICK, Touch TAP, and I tried a couple others like Gesture PRESS and TAP.
First, none of the touch events would ever register. I get mouse click to work, but then if I swipe a few times, the mouse clicking no longer works!
The code is not complicated:
Multitouch.inputMode = MultitouchInputMode.GESTURE;
mc_testButton.addEventListener(MouseEvent.MOUSE_DOWN, test_mouse);
mc_prizeScroller.addEventListener(TransformGestureEvent.GESTURE_SWIPE , onSwipe);
private function test_mouse(e:MouseEvent = null):void
{
trace("\rMouse");
log("mouse event");
}
function onSwipe (e:TransformGestureEvent):void
{
trace("\rSwipe!");
log("SWIPE");
log(".target:" + e.target);
log(".currentTarget:" + e.currentTarget);
log(" ");
}
Why would swiping then turn off mouse click? Why doesnt TOUCH_TAP ever work??? I've looked all over the web for examples and frankly, I am confused by the variety of input types supported by AIR and which to use. This is complicated by te fact that the touch simulator works for Swipe but not for press/tap.
Is there a good code example somewhere that mixed SWIPE and simple button tapping?