Filename to array

anyone can advice how i can dynamically read all the filenames in a directory and put them into an array. thank you for you help.

You’ll need PHP.
Generate a string with all the filenames in php (don’t really know how, but it shouldn’t be too hard…).
the output should look something like this.
&file1=filename&file2=filename2&file3=filename3…
then use loadvars in flash to get the values in your movie

that’s all I know (and I know it’s not much)…
Stanley

well you could edit the text file ur self…posibly put a variable at the start defining the length and then just use load vars to load it up onto the array

To load it up u would have like a for next loop going


for(i=0;i>=<number>;++i){
myArray* = eval("var"+1);
}

And yeah that would load it up.

And with that u could still have ur php script setting the text file…just have the first var something like varNumber increment every time you add an entry and stuff like that… :slight_smile: