Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically create list of filenames off server 2

Status
Not open for further replies.

adamr1001

MIS
Jul 25, 2001
166
0
0
CA

Hi,

I'd like to set up the following system, and was wondering what input you guys have as to the best way to go about this:


On load, _level0 checks the 'content' folder on the server and returns the total number of files (required to cycle through a gallery) - and if possible returns the exact filenames so each time the 'next' button is pressed, _level) knows what to load next. The idea is to make this completely dynamic so after I build the app., other designers can add SWFs to the 'content' folder and _level0 will always be able to cycle through them.

I suspect I will probably have to make a naming convention such as 1.swf, 2.swf, 3.swf, etc...

Any thoughts?
Thanks!

-Adam
 
doesnt sound too difficult but you will need a server script (asp, php) to read the folder and return the filenames to flash. these could be loaded into a listbox or combobox and making a selection would then load the file.


that sort of what you mean.
 
Thanks for the response Bill,

...that is pretty much what I mean...

I'd like the script to grab the total number of files and the filenames. Then I suppose the script can call the main flash object and load the filenames into it as passed variables... i can take care of the scripting no problem - but how should i pass these variables into flash? (i.e. pass them one at a time, pass them from a text file, or pass them into an array of size that is defined by the script... hmm... interesting... )
 
You'll need to pass them into Flash via LoadVars()/loadVariables as name/variable pairs:

&folder1=swfs&file1=file1.swf&folder2=...

etc.
 
yip.....or send in as one string with the server script adding a special symbol then using split.
 
I have been keeping my eye on this thread as it is very interesting to me. That sample is great billwatson. Could you please post the source? It would be greatly appreciated. Here's a star for you!

Lumstar
______________________________________
And The Star Continues To Shine....
 
i have decided to use XML!

its very versatile and works like a charm.

thanks a lot for your help Bill, i will keep the php example on hand for future reference... thanks!
 
that's great! Thanks so much bill

Lumstar
______________________________________
And The Star Continues To Shine....
 
hi billwatson,

Do you think you can email me the .fla for the ability to list file names as the link above is not working. my email is mirage@singnet.com.sg

thanks
mirage
 
hi Bill,

I have downloaded yr application on listing filenames from a particular folder. However I can't get it to work. Is it becos I am using IIS and does not support PHP or are there any modifications I need to make. Please advise and thanks alot.

Also I am trying to create a streaming MP3 Player for Pocket PC platform but I could not make it to stream the MP3. Any idea to make it work ? or simply it cannot be done?

regards
mirage
 
wont work without php....its the php file that reads the directory and passes the results to flash
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top