Skip to main content
January 7, 2010
Question

Getting directory list

  • January 7, 2010
  • 1 reply
  • 523 views

I’ve got an app. that can open and save XML data (using the v10 plug-in). The client wants to add a drop down populated with a list of the XML files saved in a “Sample Calculations” folder. I’m not exactly sure if AS3 can dynamically read the contents of a directory (this would have to work both online and when run as a local app, so server side scripting is not an option). Right now my only idea is to use a manually created XML file that contains a list of the other files in the directory, but this seems quite cumbersome, I’d rather have the app. just dynamically read what’s in the folder. Flash image browsers seem to be able to read all JPG’s in folder X, is this kind of thing done strictly through server side scripting? (or I guess you could also do it using a strict file naming convention and read files sequentially until you get a file not found error, not an option for me).

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
January 7, 2010

you'll need to create an air app to read the contents of a local directory and you will need server-side scripting to read the contents of a server directory.

January 7, 2010

Thanks, I was afraid of that. The Air app’s install requirement will make that a non-starter. If this were a high priority feature I’d probably spring for Northcode’s SWF Studio as a local solution, however, using an XML file list gives me at least a 70% solution at no added cost, so that’s probably going to be my approach.

kglad
Community Expert
Community Expert
January 7, 2010

you're welcome.