Skip to content

TapGesture= How to get children target #8

@dreasn

Description

@dreasn

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions