0

in my flex mobile project, developed for Ipad, I implemented swipe gestures to switch between views. After some time I realized it did'nt work from itself with multitouch, so I tried to implement a multitouch statement before the eventlistener. But it's not working, it only registers the swipe when I use one finger.

//multitouch
Multitouch.inputMode = MultitouchInputMode.GESTURE;

//gesture navigation
this.stage.addEventListener(TransformGestureEvent.GESTURE_SWIPE, handleSwipe)

private function handleSwipe(evt:TransformGestureEvent):void
{
  //do something
}
dreagan
  • 2,426
  • 6
  • 24
  • 34
  • In the app I'm building, my Xoom seems to sporadically not pick up on my swipes. So, it is not uncommon I'll have to swipe multiple times before the swipe is accepted. I have no idea if this is a hardware issue or issue w/ the Flash Platform. I ended up switching the input mode to touch point and rolling my own swipe gesture based on touch begin and touch end. – JeffryHouser Sep 22 '11 at 12:03
  • I've seen people claiming to get it to work with the code I provided above. I've already considered your alternative option, but it'd be nice if this'd work.. – dreagan Sep 22 '11 at 12:20
  • Yeah, it works. Just sometimes (maybe ~20%?) the event was not fired. It could have been a hardware issue. What devices have you tried it on? – JeffryHouser Sep 22 '11 at 12:59

1 Answers1

0

I've never done multitouch before as my things are normally very simple utilities on the phone. With that said, I recommend you read this and this.

You should also check if the gestures are supported (var supportedGesturesVar:Vector.<String> = Multitouch.supportedGestures;) which I think they are for iPad. I think the problem here is that the swipe built in gesture is only for 1 finger. You can access the raw multitouch data and create your own gesture (like 2 finger or more swiping) or you can use an open source library.

J_A_X
  • 12,857
  • 1
  • 25
  • 31