asa*_*ams 0 apache-flex sorting bubble-sort arraycollection
我有一个ArrayCollection,我希望能够将项目向上或向下鼓泡一个位置.做这个的最好方式是什么?
var ac:ArrayCollection = new ArrayCollection(yourArraySource);
ac.removeItemAt(n); // where n > 0 and n < ac.length
ac.addItemAt( item, n-1); // where n>0 ... you should test for that
Run Code Online (Sandbox Code Playgroud)
等等