views:

31

answers:

1

how can i cycle thru a local folder to add all (or some) files names and references to that file in an array using actionscript 3.0?

var fileArray:Array = new Array();
for (var item:Object in "../myFolder/")
    {
    trace(item.name);
    fileArray.push(item);
    }

something like this?

+1  A: 

You can only access the file system using AIR :/, or by having Flex make an HTTP call to a server-side language like ruby/python/php and having it return that information.

Here is an AIR Directory Listing Example (you'll have to resize the blog's code blocks because of the formatting).

Hope that helps, Lance

viatropos