fljot / GestouchExamples

Examples for Gestouch library.
https://github.com/fljot/Gestouch
MIT License
58 stars 13 forks source link

TapGesture= How to get children target #8

Open dreasn opened 10 years ago

dreasn commented 10 years ago

In flash I can get the target's children of the mouseEvent. For example a movieclip, mcBox, inside it there is a Textfield:

mcBox.addEventListener(MouseEvent.CLICK, onClick); function onClick(e:MouseEvent):void { if(e.target is TextField) trace("we hit textfield") } }

However in gestouch:

var gt:TapGesture = new TapGesture(mcBox); gt.addEventListener(GestureEvent.GESTURE_RECOGNIZED, onTap); function onTap(e:GestureEvent):void { if (e.target is TextField) trace("we hit textfield");<---never happen }

How to make TapGesture able to catch its children target?