# Random \_X Positions For Buttons (Advanced)

**URL:** <https://forum.kirupa.com/t/random--x-positions-for-buttons-advanced/208305>\
**Category:** flash\
**Created:** [November 27, 2006, 2:32pm UTC](https://forum.kirupa.com/t/random--x-positions-for-buttons-advanced/208305 "2006-11-27T14:32:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JayFranchize](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@JayFranchize](https://forum.kirupa.com/u/JayFranchize)\
**Post date:** [November 27, 2006, 2:32pm UTC](https://forum.kirupa.com/t/random--x-positions-for-buttons-advanced/208305/1 "2006-11-27T14:32:01Z")

</div>

I have 6 buttons aligned horizontally. When I press one button, I want all of the buttons to move to different \_X positions with easing that would be specified in an array or in a variable. I’m looking for the easiest code. I had the code and a fla. for this a few years ago when I was deep into Flash, mastering actionscript. Now, it’s like starting over.

Also, can anyone assist me with a similar, more advanced code? It’s the same as above, but when one presses a button, that button pressed would move to a specified \_X position, and the button that was previously in that \_X position would get back in line, to the far left of all the buttons…

This is advanced scripting, so I came home to one of the places where I learned Flash from, [Kirupa.com](http://Kirupa.com).

In any event, any assistance would be vastly appreciated.
