title: AS3 - Array containing MovieClips, indexOf
body: <p>I have this Array and these event handlers:</p>
  
  <pre><code>var btnArr:Array = new Array(aBtn, bBtn, cBtn);
  aBtn.addEventListener(MouseEvent.MOUSE_OVER, blah);
  bBtn.addEventListener(MouseEvent.MOUSE_OVER, blah);
  cBtn.addEventListener(MouseEvent.MOUSE_OVER, blah);
  </code></pre>
  
  <p>Where aBtn, bBtn and cBtn are MovieClip objects. </p>
  
  <p>When I try and get the index of one of these, during an event:</p>
  
  <pre><code>function blah(e:Event) {
       var i = btnArr.indexOf(e.target);
       trace(i)
  </code></pre>
  
  <p>So why does this trace return an <code>undefined</code> every time?</p>