# Duplicate Movie Clip problem

**URL:** <https://forum.kirupa.com/t/duplicate-movie-clip-problem/70755>\
**Category:** flash\
**Created:** [November 17, 2004, 8:08am UTC](https://forum.kirupa.com/t/duplicate-movie-clip-problem/70755 "2004-11-17T08:08:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xezton](https://avatars.discourse-cdn.com/v4/letter/x/d07c76/32.png) [@xezton](https://forum.kirupa.com/u/xezton)\
**Post date:** [November 17, 2004, 8:08am UTC](https://forum.kirupa.com/t/duplicate-movie-clip-problem/70755/1 "2004-11-17T08:08:48Z")

</div>

Ok. I’ve searched on Google for about an hour straight and I can’t find anything about this.

Let’s say I have a movie clip, box\_mc for instance. Inside of box\_mc I have four other movie clips called 1\_mc, 2\_mc, 3\_mc, 4\_mc (these aren’t the names I’m using , just for example). Let’s also say that those four movie clips onClipEvent(load) become invisible (\_visible = 0).

Now, let’s say I have a button, and that button will make a random one of those four movie clips appear. So, the code generates a random number 1-4, and then makes \_root.box\_mc.randomNumber\_mc.\_visible = 1, and all the others \_visible = 0.

Let’s say I then DUPLICATE (duplicateMovieClip()) box\_mc. So now I have a new box\_mc called box2\_mc.  
I know in order to change the position of box2\_mc, I have to refer to it with brackets, like this:  
\_root[box2\_mc].\_x = 200;

But… how, using array notation, do I control the visibilities of the four movie clips inside of box2\_mc???

I’ve tried \_root[box2\_mc.1\_mc].\_visible = 1;  
\_root[box2\_mc][1\_mc].\_visible = 1;  
and all sorts of other combinations, and I just can’t figure out how to do this. Is there something I’m missing???

Thanks ahead of time for any help.

–Xezton
