Black-box thinking needed here - the buttons should be self-contained, loosely coupled, only dispatch custom events. The parent should listen for those events and issue a command based on what they hear. The buttons should not issue the command.
Jason Merrill Bank of America | Learning Performance Solutions Instructional Technology & Media Learn about the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community Anyone can follow my nonsense on Twitter: jmerrill_2001. If you know me personally, follow more nonsense on Facebook. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Glen Pike Sent: Wednesday, February 18, 2009 10:18 AM To: [email protected] Subject: [Flashcoders] Which way is best... Hi, I am looking into the architecture of an application where components are instanciated and configured generally at runtime, although some components maybe placed on the stage at author time and "wired up" runtime. The application is pretty much an interface to control system which we talk to via an XML socket.. Most of the components are buttons which would send commands to the back end, but some would be navigational, etc. My question is: Would it be better to have my buttons themselves dispatch these commands themselves, or is it better to have the parent containers listen for button pushes and dispatch the appropriate commands? Thanks Glen _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

