title: Unable to addChild on MouseCoordinations
body: <p>What i am trying to do is, to place a new tower each time on MouseX and MouseY. but it seems it isn't working Any Idea guys?</p>
  
  <p>or if you can create a tileMap array and add new child of PrototypeTower each time when we click on the Tower (on x=50, y=400) to select and place wherever we want. When i click the the box at x=50, y=400, the startDrag() doesn't work.</p>
  
  <p><strong>Main.as</strong></p>
  
  <pre><code>package
  {
      import flash.display.Sprite;
      import flash.events.Event;
      import flash.events.MouseEvent;
      import flash.ui.Mouse;
  
      public class Main extends Sprite 
      {
          private var  pTower:PrototypeTower = new PrototypeTower;
          private var zTower:PrototypeTower = new PrototypeTower;
          private var fTower:PrototypeTower = new PrototypeTower;
          public function Main() 
          {
              pTower.x = 50;
              pTower.y = 400;
              addChild(pTower);
  
              addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
          }
          private function onAddedToStage(e:Event):void
          {
              removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
  
              pTower.addEventListener(MouseEvent.CLICK, onClicked);
          }
          private function onClicked(e:Event):void
          {
              removeEventListener(MouseEvent.CLICK, onClicked);
  
              zTower.x = mouseX;
              zTower.y = mouseY;
              addChild(zTower);
              zTower.startDrag();
  
              addEventListener(MouseEvent.CLICK, onPlaced);
          }
          private function onPlaced(e:Event):void
          {
              removeEventListener(MouseEvent.CLICK, onPlaced);
              zTower.stopDrag();
              fTower.x = mouseX
              fTower.y = mouseY;
  
              addChild(fTower);
  
          }
      }
  }
  </code></pre>
  
  <p><strong>PrototypeTower.as</strong></p>
  
  <pre><code>package 
  {
      import flash.display.MovieClip;
      import flash.events.MouseEvent;
      import flash.events.Event;
  
      public class PrototypeTower extends MovieClip 
      {   
          public function PrototypeTower() 
          {
              this.graphics.beginFill(0x00FF00);
              this.graphics.drawRect(this.x, this.y, 20, 20);
              this.graphics.endFill();
          }
      }
  }
  </code></pre>
  
  <p>Thank you, i am totally noob, wondering around from days!</p>