title: AS3 change color of movieclip when clicked
body: <p>I have circle movieclips which act as buttons. When a certain circle MC is clicked, it will fade in a square. I just want to know how to make the circle MC appear like it's selected, like changing it's color when clicked maybe? I have a lot of frames so I guess the gotoandstop thingy won't work for me. </p>
  
  <p>Code so far:</p>
  
  <pre><code>import flash.display.MovieClip; 
  import flash.events.Event;  
  import flash.events.MouseEvent;  
  
  import fl.transitions.Tween;  
  import fl.transitions.TweenEvent;  
  import fl.transitions.easing.*;  
  
  var fadeIn:Tween; 
  
  var thisCircle:MovieClip; 
  var thisSquare:MovieClip; 
  
  var circles:Array = new Array(circle1,circle2,circle3,circle4); 
  var squares:Array = new Array(square1,square2,square3,square4); 
  
  for(var i:Number = 0; i &lt; circles.length; i++) 
  { 
  thisCircle = circles[i]; 
  thisCircle.buttonMode = true; 
  thisCircle.id = i; 
  thisCircle.addEventListener(MouseEvent.CLICK, doFadeIn); 
  
  thisSquare = squares[i]; 
  thisSquare.alpha = 0; 
  } 
  
  function doFadeIn(e:MouseEvent):void  
  { 
  e.currentTarget.mouseEnabled = false; 
  trace(e.currentTarget.name + " is disabled while " + squares[e.currentTarget.id].name + " tweens in."); 
  fadeIn = new Tween(squares[e.currentTarget.id],"alpha",None.easeNone,0,1,2.5,true);  
  }
  </code></pre>