initialize="initData();">
import mx.collections.*;
public var myArray:Array = ["AZ", "MA", "MZ", "MN", "MO", "MS"];
[Bindable]
public var myAC:ArrayCollection;
public function initData():void {
myAC = new ArrayCollection(myArray);
}
public function MEMOFilter(item:Object):Boolean {
return item >= "ME" && item <= "MO";
}
public function sortICV():void {
var sort:Sort = new Sort();
sort.fields=[new SortField(null, false, true)];
myAC.filterFunction=MEMOFilter;
myAC.sort=sort;
myAC.refresh();
myCB.selectedIndex=0;
ta1.text="Sorted";
}
public function resetView():void {
myArray = ["AZ", "MA", "MZ", "MN", "MO", "MS"];
myAC = new ArrayCollection(myArray);
ta1.text="Reset";
}