# Trying to move movie clip to 3 differnt postions

**URL:** https://forum.kirupa.com/t/trying-to-move-movie-clip-to-3-differnt-postions/253423
**Category:** Uncategorized
**Created:** [March 1, 2008, 12:24am UTC](https://forum.kirupa.com/t/trying-to-move-movie-clip-to-3-differnt-postions/253423 "2008-03-01T00:24:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![showerx](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@showerx](https://forum.kirupa.com/u/showerx)
#### Post date: [March 1, 2008, 12:24am UTC](https://forum.kirupa.com/t/trying-to-move-movie-clip-to-3-differnt-postions/253423/1 "2008-03-01T00:24:06Z")

</div>

Hello everyone,

I have 3 movie clips that are acting like buttons appearing on the top of the stage from left to right,

when you click on one of them, they ease to the left of the stage from top to bottom, my next trick, and my problem, say the middle movie clip gets clicked on, I want it to move to the top of the stack on the left, the other movie clips should cycle like a wheel and go down into the other positions. Sorry, It kind of hard to explain…

I just cant figure out how to make the script do what I need, Im missing statements and other stuff…

Code goes like this…

// DESIGNATION THE POSTITIONS OF THE LEFT SIDE STACKED BUTTONS…  
var topXstack = 30; //left position of stacked icons  
var top1Ystack = 180; //top most  
var top2Ystack = 345; //middle  
var top3Ystack = 510; //bottom  
// DESIGNATION THE POSTITIONS OF THE START BUTTONS…  
var startY = 257;  
var startLX = 102; // left  
var startMX = 326; // middle  
var startRX = 550; // right

// VARS \>\> STARTING POSTITIONS OF BUTTONS  
var designXpos = design\_mc.\_x; //origonal start postition  
var designYpos = design\_mc.\_y; //origonal start postition  
var aboutXpos = about\_mc.\_x; //origonal start postition  
var aboutYpos = about\_mc.\_y; //origonal start postition  
var contactXpos = contact\_mc.\_x; //origonal start postition  
var contactYpos = contact\_mc.\_y; //origonal start postition

//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
// EASING using onEnterFrame  
//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
design\_mc.onEnterFrame = function()  
{  
this.\_x = this.\_x - (this.\_x - designXpos)/8;  
this.\_y = this.\_y - (this.\_y - designYpos)/8;  
}

about\_mc.onEnterFrame = function()  
{  
this.\_x = this.\_x - (this.\_x - aboutXpos)/8;  
this.\_y = this.\_y - (this.\_y - aboutYpos)/8;  
}

contact\_mc.onEnterFrame = function()  
{  
this.\_x = this.\_x - (this.\_x - contactXpos)/8;  
this.\_y = this.\_y - (this.\_y - contactYpos)/8;  
}

//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
// ORDER OF MOVEMENT…FROM THE START POSITION, MOVING TO THE LEFT SIDE  
//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
design\_mc.onRelease = function()  
{  
designXpos = topXstack;  
designYpos = top1Ystack;  
aboutXpos = topXstack;  
aboutYpos = top2Ystack;  
contactXpos = topXstack;  
contactYpos = top3Ystack

if(this = top2Ystack) // IF BUTTON IS IN THE MIDDLE OF THE STACK AND  
// CLICKED ON, MOVE TO THE TOP  
{ top2Ystack = top1Ystack;

```
  }

 if(this = top3Ystack) // IF BUTTON IS IN THE BOTTOM OF THE STACK AND 
                                        // CLICK ON, MOVE TO THE TOP
 { top3Ystack = top1Ystack;  
 }

```

}

about\_mc.onRelease = function()  
{  
aboutXpos = topXstack;  
aboutYpos = top1Ystack;  
contactXpos = topXstack;  
contactYpos = top2Ystack;  
designXpos = topXstack;  
designYpos = top3Ystack

if(this = top2Ystack)  
{ top2Ystack = top1Ystack;  
}

if(this = top3Ystack)  
{ top3Ystack = top1Ystack;  
}  
}

contact\_mc.onRelease = function()  
{  
contactXpos = topXstack;  
contactYpos = top1Ystack;  
designXpos = topXstack;  
designYpos = top2Ystack;  
aboutXpos = topXstack;  
aboutYpos = top3Ystack

if(this = top2Ystack)  
{ top2Ystack = top1Ystack;  
}

if(this = top3Ystack)  
{ top3Ystack = top1Ystack;

}

}
