file = new LoadVars();
file.onLoad = function() {
for (var i in file) {
n++;
list = i.split("|");
combobox.addItem("song “+n+” "+list[0], list[1]);
}
};
file.load(“http://www.file.asp”);
onChange = function () { screen.loadSound(combobox.getSelectedItem().data, true);};
function populate() {
combobox.removeall();
combobox.addItem(file);???
}
I am trying to repopulate the combobox with the already loaded asp file. I have tried many other ways and all have failed. Any pointers would be great.
hey waffe… Are you really trying to populate the combobox on Change? If you’re not, populate the combo box inside of the onload command. I ran into a similar dilemma the other day.
that is kind of it… you dont really need the function called populate, you could really populate your combo box without it. Let me give it a whirl and I’ll come back with an educated answer.
From what I can see… the populate function in your description will immediately delete what you have added with the first combobox.additem…
Also, if you want to be able to access populate(), put it in frame of the timeline. If you nest it inside another function, Im pretty sure it is only available inside of that function. I hope that makes sense.
OK, I believe I know what you’re talking about but if you look at my original question I am looking to repopulate my combobox with my already loaded asp file. When I 1st load the move everything works great. I have a trash button that removes 1 item of the list box. I also have a reload button that will reload my already been loaded asp file.
I have put a second frame on my move so I can reload the original code GoToAndPlay 2 which takes me back to frame 1.