Accessing variable PDf files in a folder

Hi all

I am new to this forum and I wish to share my intermediate knowledge of AS2 with you people!

I have the following problem or question:

How can I access files from a certain directory to make links of them?
The idea is to make a directory on the server (e.g: “/PDF”). The user can upload and delete these files and they can have different filenames.
How can I let flash search the folder and print these filenames as links, so the user can click and access these files?

Scheme:

  • search folder ("/PDF") for amount of files
  • for (i, i++, i<“amount of files”){
    make new textfield (i)
    put filenames in textfield (i)
    textfield.onPress = function(){
    Open (link to different filename)
    }
    }

Hope you understand what I am meaning? I think the solution is to combine the actionscript with Php.

Thanks!