4 Replies Latest reply on Sep 15, 2009 8:39 AM by germanpena

    AddEventListener Error 1119

    germanpena

      I have created my custom component and my custom event, but when i add an addEventListener i get an 1119 error. Please help me!!!!!!!

       

      CustomEvent

       

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

       

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

       

      Custom Component

       

      <mx:Metadata>
              [Event(name="authCustomEvent", type="classes.CustomEvents.AuthEvent")]
      </mx:Metadata>

       

      var authUserEvent:AuthEvent = new AuthEvent("authCustomEvent", usuario);

      dispatchEvent(authUserEvent);

       

      Main File


      canvasLogin.addEventListener(AuthEvent.AUTH_CUSTOM_EVENT, authEventHandler); //Error

       

      1119: Access of possibly undefined property AUTH_CUSTOM_EVENT through a reference with static type Class.

       

       

      Can someone help me???????