The example you've given isn't a parent / child scenario, it is two
components at the same level.

If you add the listener and dispatch the event to / from the component
which contains the two components, you may have more luck.

i.e. parent.addEventListener( ... ) and parent.dispatchEvent( ... )

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:       01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
<blocked::http://www.inps.co.uk/> 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact [EMAIL PROTECTED]

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mekaprakashraju
Sent: 08 August 2008 09:16
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Event Handling

 

Hi All,

Is there a way that parent will push an event to its child.

for example

<VBox>
<Component1>
.....
.....
this.dispatchEvent( XEvent );
</Component1>

<Component2>
this.addEventListener( XEvent, onXEvent );
....
function onXEvent( XEvent ) : void {
I need XEvent here
....
....
} 
</Component2>
</VBox>

any ideas ?

 

Reply via email to