On Feb 2, 2006, at 12:24 AM, Helmut Granda wrote:

Where I get confused is when I have to pass the reference from the button to the manager function. All the methods come from the same class? for a minute I thought I needed 2 classes (1 to initiate the button, 2 to handle the references of the buttons).

The point is, you can do it either way (as well as a few others) - but ultimately the manager needs a reference of the button object to work with. You can instantiate the buttons from within the manager, or outside the manager, whichever way your mind, and program design tell you to go.

For instance, if you have a class bound to a UI object, and are placing them on stage by drag and drop, you might want the manager to be completely separate... just an object in memory with references and functions designed to keep track of the on stage buttons for you.

Later on, you'll get really tricky and have the button create the manager for itself if it doesn't already exist. ;-)

--
Troy
RPSystems, Ltd.
http://www.rpsystems.net


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to