I'm trying to write some code for a simple product scroller. I have an array of product items and when the user clicks the next button I want to remove the item at the last index of the array add add it to the start index and then update the stage with the results.
+1
A:
//create a new Array var item:Array = []; //add the last element of your Array item[0] = myArray.pop(); //merge both arrays with the last element as the first element myArray = item.concat(myArray ); //update the stage with the new value of myArray
PatrickS
2010-09-10 10:31:22