# Reload loaded file

**URL:** <https://forum.kirupa.com/t/reload-loaded-file/7301>\
**Category:** flash\
**Created:** [October 28, 2002, 1:01am UTC](https://forum.kirupa.com/t/reload-loaded-file/7301 "2002-10-28T01:01:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![waffe](https://avatars.discourse-cdn.com/v4/letter/w/c37758/32.png) [@waffe](https://forum.kirupa.com/u/waffe)\
**Post date:** [October 28, 2002, 1:01am UTC](https://forum.kirupa.com/t/reload-loaded-file/7301/1 "2002-10-28T01:01:01Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 28, 2002, 2:03am UTC](https://forum.kirupa.com/t/reload-loaded-file/7301/2 "2002-10-28T02:03:19Z")

</div>

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.

🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 28, 2002, 2:15am UTC](https://forum.kirupa.com/t/reload-loaded-file/7301/3 "2002-10-28T02:15:53Z")

</div>

No, I am not trying to populate the combobox onChange.  
So where exactly would I put the populate command?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 28, 2002, 2:43am UTC](https://forum.kirupa.com/t/reload-loaded-file/7301/4 "2002-10-28T02:43:15Z")

</div>

file = new LoadVars();  
file.onLoad = function() {  
for (var i in file) {  
n++;  
list = i.split("|");  
combobox.addItem("Read profile “+n+” "+list[0], list[1]);  
function populate() {  
combobox.removeall();  
combobox.addItem();  
}  
}  
};  
file.load(“[http://www.voicezam.com/audition\_results.asp](http://www.voicezam.com/audition_results.asp)”);  
onChange = function () { screen.loadSound(combobox.getSelectedItem().data, true);};

I hope it is not because the button with the on populate command does not work.

:q:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 28, 2002, 3:18am UTC](https://forum.kirupa.com/t/reload-loaded-file/7301/5 "2002-10-28T03:18:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 28, 2002, 3:56am UTC](https://forum.kirupa.com/t/reload-loaded-file/7301/6 "2002-10-28T03:56:41Z")

</div>

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.

The combobox reloads but the loop is incorrect.

Any Thoughts?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 28, 2002, 6:05am UTC](https://forum.kirupa.com/t/reload-loaded-file/7301/7 "2002-10-28T06:05:10Z")

</div>

You where correct when you said I did not need to populate.

I made n = 0 and reloaded the 1st frame of my movie to reload my combobox?

All good hear\>\<
