You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
if (e.target.target is TextField) trace("we hit textfield"); //<----Also never happen
}
How to make TapGesture able to catch its children target?
The text was updated successfully, but these errors were encountered:
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
if (e.target.target is TextField) trace("we hit textfield"); //<----Also never happen
}
How to make TapGesture able to catch its children target?
The text was updated successfully, but these errors were encountered: