title: How to get name of MovieClip on Flash stage that was created dynamically?
body: <p>There are multiple MovieClips that will be dynamically placed on stage. These MovieClips are coded to be buttons. I'm trying to figure out--when a user clicks on the MovieClip...figure out which object on the flash stage the user clicked on.</p>
  
  <p>Inside function toggleClick I put the trace statement: </p>
  
  <pre><code>trace("movieClip Instance Name = " + e.target.name);
  </code></pre>
  
  <p>In the OUTPUT window: </p>
  
  <pre><code>movieClip Instance Name = instance5 
  movieClip Instance Name = instance12 
  movieClip Instance Name = instance5 
  movieClip Instance Name = instance32 
  movieClip Instance Name = instance5 
  movieClip Instance Name = instance59 
  </code></pre>
  
  <p>That doesn't seem the way to get a name for the MovieClip that was clicked. </p>
  
  <p>Is getChildByName() the way to do it? If so, any ideas how to use getChildByName() to get the name of the MovieClip that was clicked?</p>