>>HOW does the DataManager class listen for this event (which >>is created and dispatched from within PanelTop)?. DOES the >>DataManager class have to contain an instance of either >>PanelTop or PanelButton? If so (which I think is the case), >>you may see why I don't quite understand the event framework. >>
It would, or if all these display objects are eventually children of the Main display object, set event bubbling to true and have main listen for these events, and then tell the datamanager what to do. a simple MVC approach should make this pretty straightforward, your PanelTop and Layout are both view children of main, which is also a display object, and main has reference to the model (datamanager) - you can have a controller class which tells the datamanager an event occured. Jason Merrill Bank of America Global Technology & Operations & Global Risk L&LD eTools & Multimedia Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and technologies? Check out our internal GT&O Innovative Learning Blog & subscribe. >>-----Original Message----- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf >>Of [EMAIL PROTECTED] >>Sent: Thursday, July 10, 2008 1:40 AM >>To: [email protected] >>Subject: [Flashcoders] AS3 events, events, events ... >> >>The AS3 event framework still leaves me slightly puzzled. >> >>For one, I'm not sure why there's no EventListener class, or >>why they didn't name EventDispatcher something else, like >>EventProxy or EventBiatch, anyway, ignore that - I'll layout >>a question. Let's say you have 5 classes, all of which extend Sprite: >> >>(1)Main (2)Layout (3)PanelTop (4)PanelButton >>(5)DataManager >> >>Now let's say the following exists: >> >>A. Main contains an instance of Layout. Layout contains an >>instance of PanelTop. PanelTop contains an instance of >>PanelButton (ie: Main - Layout - PanelTop - PanelButton) >> >>B. Main also contains an instance of DataManager (ie: Main - >>DataManager) >> >>C. Within the PanelTop class, the instance of PanelButton is >>listening for a MouseEvent (click). The handler for this >>event is a method within PanelTop that creates a new custom >>event and then dispatches the event. >> >>SO here is my first question: >>Anyway, we'll see if anyone can advise on this for starters. >> >>CHeers, >>SF. >>_______________________________________________ >>Flashcoders mailing list >>[email protected] >>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

