xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"
height="500">
import mx.effects.DefaultTileListEffect;
import mx.effects.easing.Elastic;
import mx.collections.ArrayCollection;
import mx.effects.Move;
[Bindable]
private var myDP:ArrayCollection = new ArrayCollection(["A","B",'C','D','E','F','G','H','I','J','K','L','M','N','O','P']);
private function deleteItems():void {
// As each item is removed, the index of the other items changes.
// So first get the items to delete, and then determine their indices
// as you remove them.
var toRemove:Array = [];
for (var i:int = 0; i < tlist0.selectedItems.length; i++)
toRemove.push(tlist0.selectedItems[i]);
for (i = 0; i < toRemove.length; i++)
myDP.removeItemAt(myDP.getItemIndex(toRemove[i]));
}
private var zcount:int = 0;
private function addItems():void {
myDP.addItemAt("Z"+zcount++,Math.min(2,myDP.length));
}
moveDuration="100" />
columnCount="4" rowCount="4" fontSize="30" fontWeight="bold"
direction="horizontal" dataProvider="{myDP}" allowMultipleSelection="true"
offscreenExtraRowsOrColumns="2" itemsChangeEffect="{myDTLE}" />