I wish I got it right more!
yay for events in the display list hierarchies
The new event model in actionscript 3 is glorious! At first I didn’t really appreciate how useful is was… I was pleased to see that you could create custom events as this, among other things, allows you to send custom objects in events without losing strong typing. Though it wasn’t until I came to understand the event flow in display lists that it made a massive difference to my code… (my thanks to Colin Moock for this book, that really helped me get to grips with events in as3)… when you dispatch an event in a display object you can specify a variable in the event constructor (bubbles) which causes the event to propagate through the display list hierarchy, enabling you to listen for events dispatched by DisplayObjects you do not have a direct reference to. This massively helps me centralising my code, de-coupling my code and cuts down on boring code repetition.