添加本地文件名/引用数组在ActionScript [英] Adding Local Filenames/References To Array In Actionscript

查看:154
本文介绍了添加本地文件名/引用数组在ActionScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能循环直通本地文件夹中的所有(或部分)文件名和引用使用ActionScript 3.0添加到该文件中的数组?

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);
    }

这样的事?

推荐答案

您只能使用AIR访问文件系统:/,或通过具有的Flex使一个HTTP调用服务器端语言像Ruby / Python的/ PHP和有它返回的信息。

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.

下面是一个 AIR目录列表示例(你必须调整博客的code,因为格式化的块)。

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

希望帮助, 兰斯

这篇关于添加本地文件名/引用数组在ActionScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆