Duplicate MC question

Hello,
I’m using a loop to duplicate a MC named MCbutton, which is all good.

[AS]
for (i=1; i<=this.total; i++) {_root.MCbutton.duplicateMovieClip([“MCtest”+i], 1+i);
trace(_root.MCtest1);
//_level0.MCtest1
}
[/AS]

but why isn’t this one working??

[AS]
for (i=1; i<=this.total; i++) {_root.MCbutton.duplicateMovieClip(_root.someClip[“MCtest”+i], 1+i);
trace(_root.someClip.MCtest1);
//undefined
}
[/AS]

Can’t i duplicate a Clip inside another Clip??

movieclip.duplicateMovieClip(newname,depth);

You are setting it’s name equal to the path of _root.someClip[“MCtest”+i]. The movieclip will not be copied inside _root.someClip.

Thanks for your reply, but is it possible then to duplicated inside another MC ???

You would simply have to place MCButton in _root.someClip as well. Then it can be duplicated in that movie too. I don’t know of any way to duplicate a movieclip to another movieclip, sorry.

That did the trick, thanks for your reply :slight_smile:

You’re welcome :slight_smile: