Looks to me your Class "MyClass" should be the Document class. If you set it as Document class, you can attach your MovieClip like this, because the root timeline is MyClass itself:

var contentMCs:MovieClip = new ContentMC();
addChild(contentMCs);

Then from your MovieClip, you can call MyClass function "myMethod" like this:

MyClass(parent).myMethod();

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Irene Johansson wrote:
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
Irene

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to