all groups > flash data integration > march 2005 >
You're in the

flash data integration

group:

Sorting dataset to listbox


Sorting dataset to listbox jonnysoco
3/24/2005 7:50:20 PM
flash data integration: hello all,

I having trouble sorting through a dataset and populating the results into a
listbox. The code I have is listed below. If anyone can offer some assistance,
it would be greatly apprieciated.


function goSearch():Void {
//goto first data set record
_root.data_ds.first();
while (_root.data_ds.hasNext()) {
if (_root.data_ds.type == _root.lookType.text) {
list.removeAll();
trace(_root.data_ds.title);
////////////////////////////////////////////////
//data_ds.dataProvider = result;
_root.data_ds.title = pcArray;
var pcArray = new Array();
length = data_ds.length;
for (i=0; i<length; i++) {
pcArray.addItem({label:data_ds.title, data:{title:data_ds.title,
id:data_ds.id, photourl:data_ds.photourl, desc:data_ds.desc, pdf:data_ds.pdf}});
}
list.dataProvider = pcArray;
////////////////////////////////////////////////
}
_root.data_ds.next();
}
}
searchBut.onRelease = function() {
goSearch();
};
stop();

Re: Sorting dataset to listbox GeorgeWS
3/25/2005 5:56:51 PM
AddThis Social Bookmark Button