Thanks for the reply...how would the above example work for criteria that comes
dynamically through xml data? ive tried this code below on my two combo boxes
with id's of colourFilter and sizeFilter respectively...
private function filterData():void
{
xmlData2.filterFunction = applyColourAndSizeFilter;
xmlData2.refresh()
Alert.show(xmlData2.length.toString());
}
public function applyColourAndSizeFilter(item:Object):Boolean
{
if(colourFilter.selectedItem == "All colours" &&
sizeFilter.selectedItem =="All sizes" )
{
return true;
}
else
{
return item.colour == colourFilter.selectedItem &&
item.sizes == sizeFilter.selectedItem;
}