fljot / Gestouch

Gestouch: multitouch gesture recognition library for Flash (ActionScript) development.
MIT License
356 stars 84 forks source link

Is posible to know how many fingers are in the screen? #13

Closed Seb-AS closed 12 years ago

Seb-AS commented 12 years ago

Hi I have a problem with an app, I need to know is 1 or 2 fingers touching the screen. Thanks

fljot commented 12 years ago

I'm just planning to add raw touches handling apart from gestures (so this library will be useful for the whole multitouch topic, not just gestures handling).

But for now you can use "undocumented" API: var numTouches:uint = Gestouch.touchesManager.activeTouchesCount:uint NB! It decrements before delivering touches to gestures. So in your gesture/gesture handler you might have already 1 finger less. https://github.com/fljot/Gestouch/blob/master/src/org/gestouch/core/TouchesManager.as#L194

Btw could you show an example where you need this functionality right now?

Seb-AS commented 12 years ago

thanks!