title: Tweening with actionscript 3
body: <p>I have been working on this one a while. I have an object in this case a movieClip called "mcBall". I set up two buttons "btnLeft" and "btnRight"with a tween so that the mcBall will ease between the two points smoothly. 
     Works fine, but where it gets glitchy is the the two buttons are still active an if the user clicks on either button of course the ball goes back to the starting point like it's supposed to.
     My question is this ... What is the best way to have the buttons be de-activated while the "mcBall" object is moving. Would it be best to use a removeEventListener for the buttons and then have it added again. Would it be better to use an if statement like "If (mcBall.x = >=81 || &lt;=469) removeEventListener"? Maybe use the tweenEvent.MOTION_FINISH to set up the eventListener again. </p>
  
  <p>Any help would be greatly appreciated. Thanks</p>
  
  <p>using Flash cs3</p>
  
  <p>In this code I managed to turn off one button so that while the ball is moving it remains inactive but the other is still active. I'm not sure of the placement of the removeEventListener. </p>
  
  <pre><code>import fl.transitions.Tween;
  import fl.transitions.easing.*;
  
  function moveBallRight(evt:MouseEvent):void {
      var moveBall:Tween=new Tween(mcBall,"x",Regular.easeOut,80,470,4,true);
      btnRight.removeEventListener(MouseEvent.CLICK,moveBallRight);
      btnLeft.addEventListener(MouseEvent.CLICK,moveBallLeft);
  
  }
  btnRight.addEventListener(MouseEvent.CLICK,moveBallRight);
  
  
  function moveBallLeft(evt:MouseEvent) {
      var moveBall:Tween=new Tween(mcBall,"x",Regular.easeOut,470,80,4,true);
      btnRight.addEventListener(MouseEvent.CLICK,moveBallRight);
      btnLeft.removeEventListener(MouseEvent.CLICK,moveBallLeft);
  
  
  }
  
  btnLeft.addEventListener(MouseEvent.CLICK,moveBallLeft);
  </code></pre>