Reputation: 795
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
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!
Upvotes: 0
Views: 3284
Reputation: 327
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.
Upvotes: 2
Reputation: 163
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.
Upvotes: 2