Adding Local Filenames/References To Array In Actionscript

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?

Answers


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


Need Your Help

Return After Failed Login Attempt PHP

php javascript html

I am developing login form In PHP

Capistrano Deploy therubyracer bundle error

ruby-on-rails-4 amazon-ec2 capistrano therubyracer

I am having issues deploying my site to my EC2 instance using capistrano. Bundle install, gem install therubyracer (and libv8) with a variety of gem versions all work fine. The bundle only fails wi...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.