Swipe and mouse events
Hi,
I try for an iOs application to reproduce the navigation of iOs photo gallery.
In iOs gallery, you can swipe quickly with your finger and the picture slide quickly in the same direction. But if your finger swipe slowly you can drag the picture, and when you release the finger the galleru change the picture or not if you move from half of screen width.
So for my code, i catch two type of events:
Swipe event and mouse events.
viewer.addEventListener(TransformGestureEvent.GESTURE_SWIPE, handleSwipe);
viewer.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
viewer.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
For the swipe, i do the same effect that iOS.
And for the Mouse, on mouse_down, i start a startdrag() of my viewer and stop it on mouse_up.
Debugging on my Macbook Pro with the trackpad works fine, with the three fingers, for swipe effect, and with mouse for the rest.
But on my device, it seems that swipe and mouse-down start at the same time ;(
Did i need to handle the swipe gesture manually with mouse direction ? (http://www.emanueleferonato.com/2010/07/05/detecting-mouse-gestures-in-flash-with-as3/)
Thanks by advance
Regards
