0 Replies Latest reply on May 3, 2007 1:11 AM by Newsgroup_User

    how to listen Events in subclasses

    Level 7

      Hello, I'll try to be as clear as possible.

      I've two AS2 classes, say Main and Sub.
      Sub inherits from Main.
      Main gets instantiated by Sub by calling super in its constructor.
      In Sub constructor a Main method gets invocated too.
      Being this Main method related to a remoting call, it automatically
      calls a fault or a result event when it receives data from the server.
      In the Result function I put:
      dispatchEvent({type:'myMessage', target:this});

      What I'm trying to do:
      this message should be listened by Sub.
      When Sub receives this event it should fire one of its methods.

      How to do this?