though you can do this, its bad practice. For one, your component that is a
child here will be a bit coupled. Instead, let your parent handle its own
events or that of children passing events up the DOM chain. If your parent
catches some event that requires some action in a child, expose a public
method ( the interface ) that the parent can call and inject what ever data
in the parent that is necessary.
eg, say A is the parent and onSomeEvent() is called based on a event inside
A. Then you could have inside A
private function onSomeEvent():void
{
B.somePublicMethod( var1, var2, ... );
}
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
On Thu, May 14, 2009 at 7:38 PM, Laurence MacNeill <[email protected]>wrote:
> How do I get a Child to listen for events that occur in the Parent?
>
> I know how to get the Parent to listen for events in the Child -- that's
> relatively easy. But I don't know how to make the reverse happen. I would
> think there'd be a way to do that, but I just can't figure it out.
>
> Thanks for any help you can offer,
>
>
> Laurence MacNeill
> Mableton, Georgia, USA
>
>
>
> -------------------------------------------------------------
> To unsubscribe from this list, simply email the list with unsubscribe in
> the subject line
>
> For more info, see http://www.affug.com
> Archive @ http://www.mail-archive.com/discussion%40affug.com/
> List hosted by http://www.fusionlink.com
> -------------------------------------------------------------
>
>
>