All your classes can extends flash.events.EventDispatcher then they can just fire a
this.dispatchEvent(new MyEvent(aaa, bbb, ccc));
other classes can use addEventListener("XMLParsed", someHandler) to handle the event.
or you can take a look at how Cairngorm use Cairngorm Event dispatcher as a cetralized event center to dispatch event for every class.
Jeremy.
On 7/11/06,
efeminella <[EMAIL PROTECTED]> wrote:
Does anyone have any simple examples of how to dispatch and handle
events between 2 classes. For example how can I have a class that
loads and parses xml and then dispatch an event which another class
handles and the event and displays the data. Sort of like we did in AS
2 with event.target...
Thanks in advance,
Eric Feminella
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
- Re: [flexcoders] Simple Event Listener Examples between 2 ... Jeremy Lu
Reply via email to

