I'm writing a manager for ActionScript to detect SWIPE gesture. Yes, there is API to work with native (OS) gesture already, but my plan is:
- so it would work even for singletouch screens (usual platforms in other words. singletouch screen or just a regular mouse input).
- to have slightly more low-level API. Basically I'm processing regular MOUSE_DOWN@target, MOUSE_MOVE@stage и stage.MOUSE_UP@stage.
Not a rocket-science. But in order to make it working smooth (in terms of UX) you really have to think of details.
So is anyone has some small details, tips&tricks in mind? Any experience from other mobile platforms (iOS/Android/...)? What is the SWIPE gesture in low-level terms?
My concerns:
- Should this event (like TransformGestureEvent) be fired on MOUSE_UP@stage or before finger/mouse release? (if anyone has antroid-device, could you check TourDeFlex app how it happens there?)
- Main question: how to filter out? I tend to formula "(distance passed along our axis greater then N && distance passed along orthogonal axis NOT greater then M) during last T ms".
Doubt, whether to have a certain time window (starting from finger/mouse down) to do the gesture.. so that everything would be aborted after this time window (timer) is closed.
Looking forward for your notes and comments, thank you.
UPD: Some nice found ideas: http://smartandroidians.blogspot.com/2010/04/swipe-action-and-viewflipper-in-android.html using some sort of velocity