Hi,

Try adding "bubbles" parameter to the event:

var ne:NewEvent = new NewEvent(NewEvent.NEW_EVENT,*true*);

This should make the event bubble up to till the ViewStack.

Regards,
Venkat
www.venkatv.com


On Thu, Dec 18, 2008 at 5:00 PM, Lord <[email protected]> wrote:

>
> Hi,
>
> can you help me?
>
> i'll explain the problem..
>
> i've created this class:
>
> package events
> {
> import flash.events.Event;
>
> import mx.containers.Panel;
>
> public class NewEvent extends Event
> {
> public static const NEW_EVENT:String = "newEvent";
>
> override public function clone():Event {
> return new NewEvent(type);
> }
>
> public function NewEvent(type:String)
> {
> super(type);
> }
>
> }
> }
>
> then i have two custom panels that have 2 buttons respectively and
> through
> the mouse click event they dispatch the NewEvent event:
>
> var ne:NewEvent = new NewEvent(NewEvent.NEW_EVENT);
> dispatchEvent(ne);
>
> after class definitions i put the event metadata tag correctly.
>
> finally a custom viewstack, that contains the panels, listens for
> them. In the
> constructor of the viewstack i put
>
> this.addEventListener(NewEvent.NEW_EVENT, test);
>
> the function test uses the trace function to print a message.
>
> but i can't undestand why not works...maybe i made mistakes or i
> misunderstood listeners concepts?
>
> thanks a lot
>
> Regards the lord
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to