# Calling methods of a class that extends MovieClip

**URL:** <https://forum.kirupa.com/t/calling-methods-of-a-class-that-extends-movieclip/304042>\
**Category:** flash\
**Created:** [January 31, 2010, 5:58pm UTC](https://forum.kirupa.com/t/calling-methods-of-a-class-that-extends-movieclip/304042 "2010-01-31T17:58:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stratboy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/stratboy/32/3054_2.png) [@Stratboy](https://forum.kirupa.com/u/Stratboy)\
**Post date:** [January 31, 2010, 5:58pm UTC](https://forum.kirupa.com/t/calling-methods-of-a-class-that-extends-movieclip/304042/1 "2010-01-31T17:58:28Z")

</div>

Hi! I’ve got a class (say ButtonBase) that extends MovieClip. ButtonBase has a method that names it ((this.)name = ‘bb1’) and adds it to the MainTimeline. Now I can see my extended ButtonBase MC on the MainTimeline. And if from a frame I write trace(this[‘bb1’]), it returns an instance.

The problem is that the instance is not recognized as an instance of ButtonBase. Suppose ButtonBase has another method, say testMethod(). Well, if I trace(this[‘bb1’].testMethod) from a frame on the mainTimeline, it returns undefined. If I trace(this[‘bb1’] is ButtonBase), \> false

Why??? :h:

I can attach a fla if you need it.
