# Slide bar to control mcs

**URL:** <https://forum.kirupa.com/t/slide-bar-to-control-mcs/192118>\
**Category:** flash\
**Created:** [June 26, 2006, 10:57am UTC](https://forum.kirupa.com/t/slide-bar-to-control-mcs/192118 "2006-06-26T10:57:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![azik1uk](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@azik1uk](https://forum.kirupa.com/u/azik1uk)\
**Post date:** [June 26, 2006, 10:57am UTC](https://forum.kirupa.com/t/slide-bar-to-control-mcs/192118/1 "2006-06-26T10:57:13Z")

</div>

Hi,

I need to build a slide bar that controls the \_x and \_y positions of elements on an array.

As soon as you slide this bar mc[0] start moving and more you move the slide bar more mcs you move, yet all of them one by one.

Here it goes a code:

The array:

```auto
 var ordered = ["mc","mc1","mc3","mc4","mc5","mc6","mc7","mc8","mc9","mc10"]

```

The slide bar:

```auto
but_mc.onPress = function() {
    this.startDrag(false, 610, 367, 300, 367);
    onEnterFrame = moveMe;
};
but_mc.onRelease = but_mc.onReleaseOutside=function () {
    currentX = this._x;
    currentY = this._y;
    this.stopDrag();
    delete onEnterFrame;
};

```

and inside this function should go the code:

```auto
 function moveMe() {

}

```

anyone?
