Hi,
I’m currently working on a project where I have a user defined list of urls which is saved in a local SO. When the movie is loaded the ComboBox is populated with the values from the SO (Stored as array inside SO).
I want to give users the option to remove items from this list. So far I have managed to remove the selected item from the combo box, clear out the SO and loop the remaining ComboBox items, but, when I try and load these item into an array to parse back to the SO, the array is created and creates the correct amount of elements, but, each element is populated with only the data from the 0 index item of the ComboBox. Anyone got any ideas?
My code so far: (This sits inside a button component and is invoked onClick)
_root.ComboBox.removeItemAt(_root.ComboBox.selectedIndex);
_root.ComboBox.selectedIndex = 0;
_root.local_data.clear();
var dataArray = new Array();
newFeed = new Object();
for (var i=0; i<_root.ComboBox.length; i++) {
newFeed.site = _root.ComboBox.getItemAt(i).data;
newFeed.siteurl = _root.ComboBox.getItemAt(i).label;
dataArray.push(newFeed);
}
_root.local_data.data.myList = dataArray;
_root.local_data.flush();
Thanks in advance