Skip to main content
Known Participant
June 21, 2011
Question

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

  • June 21, 2011
  • 1 reply
  • 445 views

how can i acces a movieclip on the stage

in a nother movieclip class

thanks

This topic has been closed for replies.

1 reply

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;

Known Participant
June 21, 2011

thanks but i just made this:

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

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.