Hi
I want to fill my combobox component with data that I get from a php script.
This is how I get data from php
&city1=ABBENBROEK&&city2=AFFERDEN&&city3=ALBERGEN&&city4=ALKMAAR&.......
How can I populate my combox?
I want to use loadvars.....
Tx
Tom
bossche001 - 08 Jul 2008 10:41 GMT
Ok, already found it....
For those who are also searhing for ans answer...
var city_lv:LoadVars;
city_lv = new LoadVars();
city_lv.onLoad = function(success:Boolean) {
if (success) {
trace("succes");
iList = new Array();
for (i=1; i<285; i++) {
myItem = new Object();
myItem.data = i;
myItem.label = this["city"+i];
iList.push(myItem);
trace(myItem.label);
}
stad_cb.setDataProvider(iList);
} else {
trace("NOsucces");
}
};