Thanks Alex. I was able to do this only by using the code-behind technique
from labs.adobe.com, but at least it works!
On 26 Mar 2007 11:22:17 -0700, Alex Harui <[EMAIL PROTECTED]> wrote:
Make sure you set the bubbles=true when you construct the Event
object. The parent should be able to listen to itself and still see it.
parent.as
class ParentComponent
{
public function ParentComponent()
{
addEventListener("bubbler", bubblerEventHandler);
}
}
child3.as
class Child3
{
private function doSomething():void
{
var event:Event = new Event("bubbler", true);
dispatchEvent(event);
}
}
------------------------------
*From:* [email protected] [mailto:[EMAIL PROTECTED] *On
Behalf Of *Marlon Moyer
*Sent:* Monday, March 26, 2007 9:26 AM
*To:* [email protected]
*Subject:* [flexcoders] Capturing an event in a separate component
Given this scenario:
Parent Componet
Child1
Child2 (child of Child1)
Child3 (child of Child3)
and Child3 dispatches an event, how can I make the parent see that
event without having to pass it up between each child? I've made the
event bubble, but I can't seem to make the parent see it.
I can't seem to get the syntax for the addEventListener correct. Thanks
--
"I walk the shore in isolation,
While at my feet eternity,
Draws ever sweeter plans for me."