4 Replies Latest reply on Sep 15, 2009 9:45 AM by David_F57

    AddEventListeer doesn't works


      Well i have the next code but the EventListener doesn't works when i press the button. I don't know what is wrong.... Can someone help me???


      My Custom Event


      package classes.CustomEvents
          import classes.ValueObjects.Usuario;
          import flash.events.Event;


          public class AuthEvent extends Event   
              public static const AUTH_CUSTOM_EVENT:String = "AUTH_CUSTOM_EVENT";
              public var authUser:Usuario;
              public function AuthEvent(type:String, authUser:Usuario)
                  this.authUser = authUser;
              override public function clone():Event{
                  return new AuthEvent(type, authUser);





              [Event(name="authCustomEvent", type="classes.CustomEvents.AuthEvent")]


      private function clickHandler():void{
                       var authUserEvent:AuthEvent = new AuthEvent("authCustomEvent", usuario);



      My App


      private function init():void{
                      canvasLogin.addEventListener(AuthEvent.AUTH_CUSTOM_EVENT, authEventHandler);               
                      PopUpManager.addPopUp(canvasLogin, this, true);
                  private function authEventHandler(event:AuthEvent):void{
                      usuarioApp = event.authUser;


      Help please!!!