1 person found this helpful
When you say touch devices are you referring to a desktop with a touch enabled screen, or a laptop with a touchscreen?
Or are you referring to compiling to ARMv7 via AIR for a mobile app with a StageWebView?
Hi Sinious, thanks for your time
I`m looking a solution for mobile phones and tablets, iOS and Android devices. Using html5 canvas for web apps.
If you want to stay on the web and out of AIR you should take a look at EaselJS, a sibling of CreateJS. Specifically the MouseEvents it supports on Canvas:
There's only 2 events but gestures are just events in a specific order. For example a swipe is just paying attention to the mousedown, mousemove, mouseup and the amount of time it occured over. During the mousemove event you should watch the amount of pixels occuring. If the user swipes left (negative X) or right (positive X) quickly (under a second) then you yourself know the user probably intended a swipe.
You can easily code other gestures as well in this manner. Give EaselJS a look. It's designed to make HTML5 Canvas easy to use.