0
votes

I am working on an Action Script 2.0 based Flash file. I was trying to control a movieclip instance named "Xyz" which is located in a different object.

I used:

[code]_root.gotoAndPlay(4)[/code]

Now my question is how to control a flash nested movie clip instance with buttons situated in different movie clip.

The code I mentioned above takes me to the very start/root of the main animation. Where I just want to deal with a particular movieclip.

I have assigned a label to that movie clip as "XYZ", but I could not find a way to call this object and play/show particular frame.

Help please.

1

1 Answers

0
votes

Say you have mcChild nested inside mcParent, which is situated on the main timeline. To control mcChild from the main timeline (or _root), you can do the following:

mcParent.mcChild.gotoAndStop(3);

In your case, you'd need to do this:

parentInstanceName.Xyz.gotoAndStop(2); //2 is just an example, of course.

But, for this to work, you need to assign an instance name to the movieclip that contains the Xyz movieclip.

Also, this works for multiple levels of nesting. e.g. mc1.mc2.mc3.gotoAndStop(5);