# Comparing an Object's type, by only knowing the class name

**URL:** <https://forum.kirupa.com/t/comparing-an-objects-type-by-only-knowing-the-class-name/324859>\
**Category:** flash\
**Created:** [September 12, 2011, 4:27pm UTC](https://forum.kirupa.com/t/comparing-an-objects-type-by-only-knowing-the-class-name/324859 "2011-09-12T16:27:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RedGiant](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@RedGiant](https://forum.kirupa.com/u/RedGiant)\
**Post date:** [September 12, 2011, 4:27pm UTC](https://forum.kirupa.com/t/comparing-an-objects-type-by-only-knowing-the-class-name/324859/1 "2011-09-12T16:27:55Z")

</div>

I am trying to find an object in the display list. All that is known, is the name of the class.

I recursively iterate through every child in the display list to find my object’s instance, and unfortunately everything was instantiated at runtime and was given a generic instance name. This videoplayer has around 300 children(_ugh_), and through trial and error I found my instance I need to get a hold of, _instance60_.

Now it would be fine by using just the instance name, but the thought of it being called a different instance name would send this program into insanity.

Thank you in advance,  
Rob N.
