Check it... New Array Formula

file = new LoadVars();
file.onLoad = AddItems;
file.load(“http://www.file.asp”);
function AddItems() {
for (i=0; i<file.NumItems; i++) {
var Name = eval(“file.Name”+i);
var Link = eval(“file.Link”+i);
var Desc = eval(“file.Desc”+i);
var DataProvider = {Name:Name, Link:Link, Desc:Desc};
listBox.addItem(Name, DataProvider);
}
listBox.setChangeHandler(“SelectItem”);
// set change handler.
}
function SelectItem() {
_root.Name = listBox.getSelectedItem().data[“Name”];
_root.Link = listBox.getSelectedItem().data[“Link”];
_root.Desc = listBox.getSelectedItem().data[“Desc”];
}

This looks like better code then the code Sbeener gave on the thread “Parse” of the array, but here are a few hundred Questions:nerd:

  1. I would like to implement a onChange function to load a sound file.

onChange = function () { screen.loadSound(listBox.getSelectedItem().data[“link”], true);}; :q:

Its the same old story, load the array parse the string and use there data where I want.:evil:

The asp file for this code is also different.
It goes like this

&Name0=123&link0=song.mp3,desc0=wow&
&Name0=123&link0=song1.mp3,desc0=neat&
&Name0=123&link0=song2.mp3,desc0=o&

&numItems=3&

There is an extra “&” in every string but only 3 items show in the list box.

Any pointers would be much appreciated.

yeah i don’t really understand…should really read ur post…heh