Skip to main content
Known Participant
June 21, 2011
Question

acces to a movieclip thats already placed onthe stage in a nother movieclip class?

how can i acces a movieclip on the stage

in a nother movieclip class

thanks

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Colin Holgate
Inspiring
June 21, 2011

You could pass in a reference to the stage to your other movieclip, and look for ref.mcname, or you can say:

MovieClip(root).mcname;

If that fails for some reason you could go via the name of the movieclip as a string, and say:

var mc:MovieClip = MovieClip(root).getChildByName("mc on stage name") as MovieClip;

Translate
Known Participant
June 21, 2011

thanks but i just made this:

var thing:Thing=DocumentClass(root).thing;

Translate
Colin Holgate
Inspiring
June 21, 2011

If you're saying that what you just said worked, then it's because it's the same as my one, as your document class extends movieclip.

Translate