Flash 更新阵列,然后更新阶段

Flash 更新阵列,然后更新阶段,flash,actionscript-3,Flash,Actionscript 3,我正试图为一个简单的产品滚动条编写一些代码。 我有一个产品项目数组,当用户单击“下一步”按钮时,我想删除数组最后一个索引中的项目,将其添加到开始索引,然后用结果更新阶段 //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 elem

我正试图为一个简单的产品滚动条编写一些代码。 我有一个产品项目数组,当用户单击“下一步”按钮时,我想删除数组最后一个索引中的项目,将其添加到开始索引,然后用结果更新阶段

//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 //创建一个新数组 变量项:数组=[]; //添加数组的最后一个元素 项[0]=myArray.pop(); //合并两个数组,最后一个元素作为第一个元素 myArray=item.concat(myArray); //使用myArray的新值更新阶段