> I've tried not using Application.appication and still get nothing, > what am I not understanding about receiving events from another Class.
That events dispatched from an instance not on the display list do not bubble. regards, Muzak ----- Original Message ----- From: "duncan mcmillan" <[EMAIL PROTECTED]> To: <flexcoders@yahoogroups.com> Sent: Friday, November 16, 2007 4:45 PM Subject: [flexcoders] Event dispatching and receiving Folks Maybe I'm interpreating all the docs wrong but, I have a Custom Class which is one of several View Classes as part of an MVC model I'm using. I have an associated Controller class. I want the Custom class to dispatch custom Event to the COntroller class, the Custom class is embedded somewhere in the Display list under a Base View Class. [Event(name="menuitemClicked", type="flash.events.Event")] Custom Class { private function onClick(event:Event) { var e:Event = new Event("menuitemClicked", true, false); dispatchEvent(e); Alert.show("Event Dispatched"); } } In the Controller Class { public function init() { Application.application.addEventListener("menuitemClicked", menuitemClickHandler); } //This MVC EventHandler public function menuitemClickHandler(event:Event) { Alert.show("Event received by COntroller"); } } I've tried not using Application.appication and still get nothing, what am I not understanding about receiving events from another Class. Cheers Duncan -- 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 <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/