I get this one on the boards a lot, so here’s the upshot.

Q. I’m trying to use mySpecialMethod from a child (or externally loaded swiff), and [blah] happens – how can I get access to a parent’s methods and properties?
A. Short answer – you don’t. Well, you can, but you shouldn’t. We see newer developers casting root or parent or parent.parent as a custom class instance, and it’s the wrong approach entirely. Sure it might work – sometimes. But what happens if that child gets moved farther down the display list, or your design calls for another intervening ancestor – or you’re trying to access the root property from a loaded swiff? Failure – or at best, hunting down every instance of this terrible practice and updating the correct number of parents in a chain of parent.parent statements.

Flash has an excellent event management system built in. It’s not just for getting mouse information or handling enterframes – an event should be just that – whenever something happens, dispatch an event. Whenever you want to react to an event, make sure an event listener has been assigned.

So instead of

Dispatch an event from the child:

And listen for it in the parent:

In the above examples, I’ve used string event types – best practice would be to use custom events and static constants:

If you want to avoid the repeated boiler-plate custom event subclasses, there are nice open-source event management classes like signals that will do this for you.