> You can override the getter and/or setter of any
> property: x, y, width, height, etc.

This is actually one of the benefits in AS2 of using composition instead of inheritance with MovieClip.

If you use composition, you can create your own proxy get/set MovieClip methods and do whatever you need before you pass it to the MovieClip itself.

The discussion about composition vs inheritance is well beyond a 101 level course, it's more like 400 level. ;)

Composition with MovieClips is something that you won't truly understand the benefits of until you do it a bunch. Like many new design patterns that you learn, a light bulb will turn on and you'll have that "Ah ha!" moment and all will make sense.

One of the things to watch out for is when you learn a new design pattern you use it for everything, even when it isn't appropriate. This is good for learning because it helps you find the limits of a design pattern's usefulness, but a lot of developers get stuck overusing particular design patterns when they're not really the right one to use.

Singleton has got to be the most over and misused design pattern in the history of design patterns. Static classes, while not a design pattern, are a close second in the over and misused coding methodologies category.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to