GestouchExamples icon indicating copy to clipboard operation
GestouchExamples copied to clipboard

TapGesture= How to get children target

Open dreasn opened this issue 11 years ago • 0 comments

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?

dreasn avatar Mar 31 '14 04:03 dreasn