title: Get instances by class name in AS3
body: <p>I need to get all the instances in my stage according to an especific class name. I'm doing this:</p>
  
  <pre><code>var class_ref:Class = getDefinitionByName('fran.MyOwnClass') as Class;
  var element;
  
  for (var i:uint = 0; i &lt; this.parent.numChildren; i++)
  {
      element = this.parent.getChildAt(i);
      if (element is class_ref)
      {
          trace('Found element of class fran.MyOwnClass');
      }
  }
  </code></pre>
  
  <p>But I want a better way (more efficiently, without checking all the MCs). Is it possible?</p>