Skip to main content
Participant
February 9, 2008
Answered

Access Movie Clips from inside another Movie Clip

  • February 9, 2008
  • 4 replies
  • 808 views
Hi!

I have some objects (movie clips) on my stage on different layers, but all in the first frame of a layer. And now I want to access this movie clips from inside another movie clip, which is also on the stage like the others.
So my question is: How can I access this movieclips so that I can do for example <movieclip_outside>.gotoandplay("in"); or something like this.

Greets, Tschouba
This topic has been closed for replies.
Correct answer kglad
if intro is on the main timeline, you can reference it from anywhere by using:

MovieClip(root).intro.gotoAndPlay("in");

4 replies

kglad
Community Expert
Community Expert
February 10, 2008
you're welcome.
GrandtoneAuthor
Participant
February 10, 2008
Yes, that worked fine! :)
Thanks kglad!
kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
February 10, 2008
if intro is on the main timeline, you can reference it from anywhere by using:

MovieClip(root).intro.gotoAndPlay("in");
kglad
Community Expert
Community Expert
February 9, 2008
use the correct path and name. you may need to cast the object as a movieclip, if the compiler complains.
GrandtoneAuthor
Participant
February 10, 2008
What do you mean with correct path? The instances of the movieclips on the stage have all names (for example "intro") and when I try to call inside another movieclip on the stage "intro.gotoAndPlay("in")" the compiler says "access of undefined property intro". Do I have to import something? Or how can I access the stage, I thought about like "stage.intro.gotoAndPlay("in"), but this didn't worked...