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




__,_._,___

Reply via email to