PDA

View Full Version : Ultimate Fadin Slideshow - building an array from a text file



Jim Weinberg
04-24-2008, 10:23 PM
Hello all.

Some time ago I came across a response that someone had given on how to create the arrays for UFS from a list in a text file. I didn't need it then and now that I do, I can't find it. Does someone remember what that code was?

Thanks.

jscheuer1
04-27-2008, 03:13 PM
The only thing close to that I remember is:

http://www.dynamicdrive.com/forums/showthread.php?t=13488

This doesn't quite do what you say, but could be adapted to actually make the array, which you could then cut and paste to wherever it's required.

It's also possible to grab files another way. If all of your image filenames are the same except for prepended or appended sequential numbers, and you know how many there are, javascript itself can 'fetch' (actually identify and use - amounts to the same thing) them from a folder.

Then there are always server side methods like PHP or asp which require no knowledge of the filenames, only that the server be enabled to use the PHP, asp or whatever.

AJAX and/or XML (as well as the server side methods already mentioned) probably would be able to be used to import filenames or an entire array from a text file, I'm just not familiar with how to do that.

If you have the actual array in a text file, it could simply be added as an external script (tag) to the page which would use it.

Jim Weinberg
05-06-2008, 02:10 PM
John.

Sorry it took so long to get back to you, I was out of town. Thanks for the suggestions. I've decided to try it a different way. I've posted a thread to ask about building the array dynamically from the contents of a folder. That would be a more reasonable (although maybe not doable) approach.

Thanks again.
Jim

jscheuer1
05-06-2008, 03:56 PM
See:

http://www.dynamicdrive.com/forums/showthread.php?t=29378

But this is really better done with Swiss Army slide show, due to how the preloading is handled and how Swiss Army can accommodate varying sizes of images:

http://www.dynamicdrive.com/dynamicindex14/swissarmy/index.htm

Swiss Army can also be adapted (as mentioned in the above linked thread) to use asp or PHP to grab the images.