# Duplicated MC's and MC arrays

**URL:** <https://forum.kirupa.com/t/duplicated-mcs-and-mc-arrays/253221>\
**Category:** Uncategorized\
**Created:** [February 28, 2008, 6:52am UTC](https://forum.kirupa.com/t/duplicated-mcs-and-mc-arrays/253221 "2008-02-28T06:52:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tivaelydoc](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@tivaelydoc](https://forum.kirupa.com/u/tivaelydoc)\
**Post date:** [February 28, 2008, 6:52am UTC](https://forum.kirupa.com/t/duplicated-mcs-and-mc-arrays/253221/1 "2008-02-28T06:52:07Z")

</div>

[http://tivaelydoc.110mb.com/shimmy3.fla](http://tivaelydoc.110mb.com/shimmy3.fla)

I having two problems and I really don’t know where to read up on to solve this.

This is my basic code:

```php
var myclips = new Array("bill", "ted");
var sel = "MC"+n

for (i=0; i<myclips.length; i++) {
    t = this[myclips*];
    t.onPress = function() {
        _root.sel = this;
    };
}

MC.onPress = function() {
    startDrag(this);
    this.duplicateMovieClip(MC,"MC"+n,this.getNextHighestDepth(+1));
};

MC.onRelease = function() {
    stopDrag();
};

speed = 2;
speed2 = 10;
stop();

_root.sel._x += Key.isDown(76)*speed;
_root.sel._x -= Key.isDown(74)*speed;
_root.sel._y += Key.isDown(75)*speed;
_root.sel._y -= Key.isDown(73)*speed;

```

And I also have a Next and Prev button that I can’t seem to figure out how to code to get them to go forward and back from the myclip var.

So, basically, what I am trying to do is get a Next and Prev buttons to change the currant MC in the array, then once it’s clicked, the sel var is selected and the MC is duplicated. From there, I am trying to get it to keep duplicating every time the original MC is clicked on.

Any help is good help.
