FLEX: why the event is only listened by the dispatcher component ?

Posted by Patrick on Stack Overflow See other posts from Stack Overflow or by Patrick
Published on 2010-05-14T09:26:39Z Indexed on 2010/05/14 10:04 UTC
Read the original article Hit count: 166

Filed under:
|

hi,

I've a parent (Canvas) with many children (LinkButtons)

The linkButtons trigger an event to communicate between them:

dispatchEvent(new SameBookmarkEvent("SameBookmarkEvent", bookmark.name));

and all linkButtons have a listener

this.addEventListener("SameBookmarkEvent", highlightMe);

...

private function highlightMe(e:SameBookmarkEvent):void {
    //do something
}

Now, the issue is that the event is only listened by the dispatcher child. In other words, only the child triggering the event, is receiving it. I was wondering what's wrong with it, and if I should add a listener to the parent (Canvas)...

I basically need the children (LinkButton) communicate between them

© Stack Overflow or respective owner

Related posts about flex

Related posts about flex3