Closed nazariof closed 11 years ago
GestureEvent.GESTURE_CHANGED
is dispatched by continuous gestures while interaction (e.g. pan, transform, rotate, etc...). Gesture state change is a bit different story, and to handle that you should listen to GestureEvent.GESTURE_STATE_CHANGE
(this event is dispatched every time state changes (and also each time before GestureEvent.GESTURE_CHANGED
).
You can listen either to GestureEvent.GESTURE_STATE_CHANGE
and check event.newState
, or listen to specific events such as GestureEvent.GESTURE_BEGAN
, GestureEvent.GESTURE_ENDED
, etc.. or both ways, but that probably doesn't make much sense.
@nazariof any success?
Oh Sorry for not replying .
Works, as you expected :D
Big thanks! NAZ
On Mon, Jun 3, 2013 at 2:54 PM, Pavel Pevnitskiy notifications@github.comwrote:
@nazariof https://github.com/nazariof any success?
— Reply to this email directly or view it on GitHubhttps://github.com/fljot/Gestouch/issues/43#issuecomment-18838912 .
Hey Pavel,
Thanks for your work.
I'm making a small demo for dragging a Starling object with a LongPressGesture of one finger and it works, it detects the Gesture properly but as i release my finger, i never got the GestureState.CANCELLED, GestureState.IDLE or GestureState.ENDED, i'm doing this the most basic way and i never get the GESTURE_RECOGNIZED or POSSIBLE, probably i'm missing something...
_longPressGesture.addEventListener(GestureEvent.GESTURE_CHANGED, onLongPressChanged);
and then checking what changed on the state.
I'm testing on a GalaxyTablet where other gestures have worked out fine, and also using the latest version of AIR
Thanks! NAZ