set the event bubbling to true. or add the event listener directly to the
child

On Feb 18, 2008 2:21 PM, dsds99 <[EMAIL PROTECTED]> wrote:

>   Code wise, everything seems to be in order...If I add an eventListener
> in the child for my event("myEvent"), it works!, but it should
> propogate to the parent since that's what event do
>
> Child class:
>
> public class Child extends UIComponent{
> [Event(name="myEvent",type="flash.events.Event")]
> public function Child()
> {
> dispatchEvent(new Event("myEvent"));
> }
> }
>
> In my parent class:
> public class Parent extends UIComponent{
>
> public function Parent(){
>
> this.addEventLsitener("myEvent",gotEvent);
> var c:Child = new Child();
> }
> public function gotEvent(e:Event):void{
> trace("Event received");
> }
>
> }
>
>  
>

Reply via email to