title: How to change a sprite color when a button has been clicked AS3
body: <p>i have a sprite (circle), i made it with actionscript.
  Here is the pseudocode:</p>
  
  <pre><code>    var board:Sprite = new Sprite();
      var spDot:Sprite = new Sprite()
      spDot.graphics.lineStyle(1,0x0000CC);   
      spDot.graphics.beginFill(0xFFFFFF); //white;
      spDot.graphics.drawCircle(0,0,dZ);  
      spDot.graphics.endFill();
      spDot.name="v";
      board.addChild(spDot);
  </code></pre>
  
  <p>and i have a button "btnA" to change a current sprite color (white) to black.</p>
  
  <pre><code>btnA.addEventListener(MouseEvent.CLICK, changeColor);
  function changeColor(evt:MouseEvent){
       (board.getChildByName("v") as Sprite).graphics.beginFill(0x000000);
  }
  </code></pre>
  
  <p>but, my problem, it returned error in this part: <code>(board.getChildByName("v") as Sprite).graphics.beginFill(0x000000);</code></p>
  
  <p>Actually i just guessed to use <code>(board.getChildByName("v") as Sprite).graphics.beginFill(0x000000);</code> to change the color.
  Do you have any idea? Thank you!</p>