0
我正在尝试为简单的产品滚动器编写一些代码。 我有一个产品项目数组,当用户单击下一个按钮时,我想删除数组最后一个索引处的项目,将其添加到开始索引,然后用结果更新阶段。更新数组然后更新阶段
我正在尝试为简单的产品滚动器编写一些代码。 我有一个产品项目数组,当用户单击下一个按钮时,我想删除数组最后一个索引处的项目,将其添加到开始索引,然后用结果更新阶段。更新数组然后更新阶段
//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