0
votes

this might not make much sense but here we go. I have a movie clip (Player) and inside of that I have some frames that hold movie clips. Inside of those is an animation sequence. I wish to play certain ones on actions in AS3. So it's like this. Frame > Player(MovieClip) > Frame...Frame > playerDownBlock(MovieClip) > Frame...Frame. I wish to play the final frames in the final movieclips if I can. Is this possible?

Here is my set-up.

Layout/ Path of movieclips

Img1

Img3

Img4

I've attempted to do it by using this line.

Player.playerDownBlock.gotoAndPlay("playerDownBlock");
// Or
Player.gotoAndPlay("playerDownBlock");

None of these work and I don't know if I can even do it. Any help would be fantastic!

2
Where is your Actionscript located?Doppio
Internal file on a frame. Right click > actions on its own frameKyle93

2 Answers

2
votes

All you have to do is:

mc.mc2.play();

With "mc" being the instance name of the first outside Movie Clip and "mc2" being the instance name of the inside Movie Clip.

2
votes

Simple. gotoAndPlay can have a frame number or a label as a parameter. You're using a label:

Player.playerDownBlock.gotoAndPlay("playerDownBlock");

..."playerDownBlock" (just replace that last bit with the frame number):

Player.playerDownBlock.gotoAndPlay(25);  // or whatever

...or give that frame a label in the timeline and use that instead of a number.