PDA

View Full Version : Flash File Browser (server side)



jbailey
May 6th, 2007, 05:08 PM
Not sure if this best fits in this forum or in the AS one.


I am trying to develop my one file browser similar to the one on www.flash-db.com. However, their version is AS1 ! I'm wanting to learn to create my own version, so I'm looking for nudges in the right direction.

What are methods preferred out there? Is going strictly php and javascript the best way (eg http://www.betriebsraum.de/blog/2006/01/13/download-flash-8-file-browser/)? Are there other methods?

Thanks a ton guys, I'm looking forward to your opinions, links, and ideas. I really just want direction (nudges in the right direction) and preferred methods.

jbailey
May 17th, 2007, 10:11 AM
this must be a well guarded secret ;-) 92views no replies

or I cannot write good questions

zellers
May 21st, 2007, 01:41 AM
:x What ur asking is somthing that I wouldn't mind either.... I mean, they must have some sort of server side script that would handle all of these files, and essentially make an index of somthing that flash could load in, in order to see what each file is called and it's location etc... I can't think of any way to be able to instanly see all the files, cuz i'm pretty sure flash can't do that, unless it loads a file which contains the info of all the other files if you know what I mean.

mkeefe
May 21st, 2007, 02:01 AM
Have PHP pull in the dir/file listings, then pass an XML file to Flash. Always use proper permissions and all that good stuff.

Couple functions in php to look at:
isdir()
opendir()
closedir()

and here is some REAL old code I wrote about 2 years ago.



$pictureList = Array();
$dir = opendir('bandSlideShow'); // open directory, pull contents
while(false !== ($file = readdir($dir))) { // loop through directory, could be recursive
if ($file != "." && $file != "..") { // valid file?
$pictureList[] = $file; // add to the list of files
}
}
closedir($dir); // free up some memory

print_r($pictureList); // show file list in array form


Ask if you need more help.

-m