Adding Local Filenames/References To Array In Actionscript

一个人想着一个人 提交于 2019-12-14 04:01:58

问题


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:


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



来源:https://stackoverflow.com/questions/2346547/adding-local-filenames-references-to-array-in-actionscript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!