Skip to main content
Known Participant
Jun 21, 2011 10:51 PM UTC
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
Jun 21, 2011 10:55 PM UTC

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
Jun 21, 2011 11:07 PM UTC

thanks but i just made this:

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

Translate
Colin Holgate
Inspiring
Jun 21, 2011 11:10 PM UTC

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