This content has been marked as final. Show 2 replies
You probably have 7 more items and 7 more frames than you need if I'm interpretting your description property.
You should be able to have one of those frame items as a movieclip, where you have 8 of them total, sharing the same frame. You can then use their _y location properties to control which items are where on the list. The _y location values could be stored as fixed values in an array.
Each item could carry a position variable indicating where it currently is, so that when when you click its up or down button it exchanges _y positions with whichever item's position variable occupies the destination space, using a loop to find out which item has that position.
If a piece occupies the first or last position, then moving it up or down, respectively is denied.
It's simpler than it might sound.
If there is some reason you need to have all 8/64 of the items you identified, you will need to explain a little more about what you are trying to do.
The reason that I used 8 instances of the same clip was that instead of actually changing the objects position, I was changing the frame on the clip. So that in order to move object one(frame one) down one position, I would change instance two to frame 1 and in turn instance 1 to frame 2. Essentially swapping positions in the list.
I'm sure using arrays is the answer, but I find them a bit daunting. Perhaps using an array to list the items and then placing them in the correct order in text fields would be easier than moving them around on the stage? Could you point me in the right direction with regards to keeping the objects in an array and rearranging the array according to the user interaction?