--- In flexcoders@yahoogroups.com, "Tracy Spratt" <tspr...@...> wrote: > > That looks ok, does it work with a base Event? (a side note, in the > handler, you can access any public property of the panel via the > event.target reference, os you do not have to use a custom event. ) > > > > Tracy Spratt > Lariat Services > > Flex development bandwidth available > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On > Behalf Of thelordsince1984 > Sent: Tuesday, February 03, 2009 11:38 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Custom Event and bubbling phase > > > > Hi, > > i have a main application and there i create a popup panel... > > from the popup panel i dispacth a custom event like this > > var e1:CustomLoadEvent = new CustomLoadEvent("loadModule", true); > dispatchEvent(e1); > > where loadModule is the type and the value true stands for bubbles.. > > then at the creationcomplete event within the main application i > create an eventlisteners for the event > > addEventListener("loadModule", loadThisModule); > > the loadThisModule function simple trace a string.. > > but it doesn't work!!Why? > > Thanks in advance > > Regards Lorenzo > thanks for the reply..
CustomLoadEvent is a custom event, it extends Event class...but doesn't work..i don't know why... in this class i also override the clone method... the CustomLoadEvent class has a public properties...i omit it in dispatchevent function for simplicity.. the function loadThisModule catchs the event in this manner private function loadThisModule(event:CustomLoadEvent):void{ trace(event.identification); } where identification is the public property of customloadevent class. thanks in advance Regards Lorenzo