I’m making an MP3 player for my website and I want to be able to be able to make a txt (or xml) file that will define the playlist, the thing i’m having trouble with is doing a for each type thing (im a php guy :)) all i need is for it to add each line to a listbox or something, can you help me please?
thanks in advance, just say so if you want me to do something in return
I would use a mySql db to add each one and then count with php the number of rows. Then set a var and use a while loop to cycle through and append the var that is '++'d each time to the end of the name. or just set the table’s rowid to autoincrement and use that b/c it should go numerically 1-end.
then write to a txt file and load that file.
::edit:::
oh, you mean from flash, I’m no AS whiz, it’d take me forever.
[AS]on (release) {
current = “0”;
data = [“one”, “two”, “three”];
total = data.length;
while (Number(current)<Number(total)) {
list.additem(data[current]);
current = Number(current)+1;
}
}[/AS]