title: AS3: How to dispatch event from actionscript class
body: <p>I have small chess application which consists of cells and boards. When user moves an item to the board, I want the board cell to dispatch an event so Board can listen to it and call a listener</p>
  
  <pre><code>public class BoardCell extends Canvas
  {
    public function Sample():void
    {
        ....Some code
        var e:Event = new Event("newMove")
    dispatchEvent(e);
    }
   }
  </code></pre>
  
  <p>However, I can't catch the event in parent chess board class (Not sure that I listen for it correctly)</p>
  
  <pre><code>    public class FrontEndBoard extends ChessBoard
  {
  
      private var initialPoition:String;
  
      public function FrontEndBoard()
      {
          //TODO: implement function
          this.addEventListener(Event.ADDED_TO_STAGE, addedToStage);
          this.addEventListener("newMove", moveEvent);
          super();
      }
  </code></pre>