开发者

multitouch swipe not working

开发者 https://www.devze.com 2023-04-06 12:20 出处:网络
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 m

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:Tran开发者_如何学PythonsformGestureEvent):void
{
  //do something
}


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号