2 Replies Latest reply on May 17, 2008 2:07 AM by Newsgroup_User

    event listener from inside a class AS2

    Level 7
      HI all

      I want to register a class for an event so all instances of that class
      receive the event

      conceptually like this:
      class cms {

      public var editing:Boolean = false;


      public function cms() {

      this.addEventListener("editMe");
      }

      public function toggleEdit():Void{
      if(this.editing==true){
      this.editing = false;

      }else{

      this.editing = true;

      }
      trace(this.editing);

      }

      public function clickHandler(e:Object){
      trace('yeah got that')
      }

      }

      am I barking up the wrong tree or perhaps just barking?


      Cheers