# How do I get the 'super' or 'base' class of an object?

**URL:** <https://forum.kirupa.com/t/how-do-i-get-the-super-or-base-class-of-an-object/302170>\
**Category:** flash\
**Created:** [December 22, 2009, 6:00pm UTC](https://forum.kirupa.com/t/how-do-i-get-the-super-or-base-class-of-an-object/302170 "2009-12-22T18:00:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaedo](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Shaedo](https://forum.kirupa.com/u/Shaedo)\
**Post date:** [December 22, 2009, 6:00pm UTC](https://forum.kirupa.com/t/how-do-i-get-the-super-or-base-class-of-an-object/302170/1 "2009-12-22T18:00:05Z")

</div>

How do I get the ‘super’ or ‘base’ class of an object?

for example I have the classes ‘Red’ ‘Green’ ‘Blue’ that all extend ‘Colour’;

I would like to have some code that does this

```auto
if(myObject.super is Colour)trace('Colour detected');

```

at the moment I have something like

```auto
if(myObject is Red || myObject is Blue || myObject is Green)trace('Colour detected');

```

Thank you for your consideration.
