fljot / Gestouch

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

stage listener #17

Closed chrisid closed 11 years ago

chrisid commented 12 years ago

I'm trying to integrate this with Nape + Starling, but I can't find a way to listen to the stage events, so I could get the obj list under the touch, any idea on how to do it?

fljot commented 12 years ago

Could you describe the task and the problem in more details?

chrisid commented 12 years ago

this is what I'm trying to achieve on a starling sprite, but only the CHANGED is dispacthed.

freeTransform = new TransformGesture( stage ); freeTransform.addEventListener(GestureEvent.GESTURE_BEGAN, onFreeTransform); freeTransform.addEventListener(GestureEvent.GESTURE_CHANGED, onFreeTransform); freeTransform.addEventListener(GestureEvent.GESTURE_ENDED, onFreeTransform);

private function onFreeTransform(event:GestureEvent):void { trace(event.eventPhase); }

fljot commented 12 years ago

Did you write this correctly? Because Event#eventPhase is a standard thing http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/Event.html#eventPhase and has nothing to do with the gestures.

And anyway, I don't see any point in adding TransformGesture to the stage since you won't transform stage itself, right? So let's try again, define the task a bit more precisely and show more actual code.

fljot commented 12 years ago

How is it going @chrisid ?