# How to call class method from a movieclip?

**URL:** <https://forum.kirupa.com/t/how-to-call-class-method-from-a-movieclip/250541>\
**Category:** flash\
**Created:** [January 30, 2008, 12:33pm UTC](https://forum.kirupa.com/t/how-to-call-class-method-from-a-movieclip/250541 "2008-01-30T12:33:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhf](https://avatars.discourse-cdn.com/v4/letter/b/838e76/32.png) [@bhf](https://forum.kirupa.com/u/bhf)\
**Post date:** [January 30, 2008, 12:33pm UTC](https://forum.kirupa.com/t/how-to-call-class-method-from-a-movieclip/250541/1 "2008-01-30T12:33:26Z")

</div>

Hello!  
I am having a big problem, hope someone can help me.

I have made a class which i import in my flash file. The first and only frame of the file looks like this:

import myClassFolder.\*;  
var myClassInstance:myClass = new myClass(this.stage);  
stop();

Inside the class i am attaching a movieClip from a library and declaring a methof:

public class myClass extends Sprite{  
var contentMCs:MovieClip = new contentMC();  
…  
}  
public function myMethod(){  
}

The contentMC contains 8 frames, each of the frame has a movieClip.

In the frame 2 of the contentMC MovieClip i want to call myMethod of the myClass.  
Anyone who know how to do this?  
Thanks in advance
