average dev
average dev

Reputation: 1118

Swipe behavior for touch applications

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:

  1. so it would work even for singletouch screens (usual platforms in other words. singletouch screen or just a regular mouse input).
  2. 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:

  1. 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?)
  2. 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

Upvotes: 9

Views: 2081

Answers (2)

average dev
average dev

Reputation: 1118

I have started my own open source project. Check out Gestouch on Github: http://github.com/fljot/Gestouch

Upvotes: 4

Jevgenij Dmitrijev
Jevgenij Dmitrijev

Reputation: 2238

Have you tried this one:

GestureWorks

It is an AS3 gestures API.

Upvotes: 0

Related Questions