user178267
user178267

Reputation:

Get MovieClip in another frame

I'm in frame 1 of a movie, and I want to use getChildByName("mc_movieclip"); to get a reference to mc_movieclip. The problem is that mc_movieclip does not exist in frame 1 but only in frame 5. How can I get a reference to this MovieClip, even though it's in another frame?

Upvotes: 1

Views: 1375

Answers (1)

Makram Saleh
Makram Saleh

Reputation: 8701

The easiest way to fix this is that you put a copy of mc_movieclip on frame 1 and make it hidden. mc_movieclip.visible=false will do the trick.

Note: if your mc has animation (in its timeline) then you have to restart that animation on frame 5 to get the same effect as before.

Upvotes: 2

Related Questions