开发者

Using standard OS dialog to browse for files and directories in Action Script 3.0

开发者 https://www.devze.com 2022-12-14 12:37 出处:网络
I know very little about Flash so I apologize in advance for asking what is possibly a dumb question, although I did a fair bit of research before posting.

I know very little about Flash so I apologize in advance for asking what is possibly a dumb question, although I did a fair bit of research before posting.

Our current Flash app, written in AS3.0, is able to display a standard OS browse dialog for the purpose of allowing a user to select files. We are using http://livedocs.adobe.com/flash/9.0/ActionScriptLang开发者_开发问答RefV3/flash/net/FileReferenceList.html to display this dialog.

The documentation for FileReferenceList states that only files could be selected. The new requirement is to allow the user to select directories as well as files. Afterward it would be very nice, but not required, to be able to get a recursive list of all the files in the selected directory. Is it possible to implement this in Flash running inside a browser?

The closest I've seen so far is http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/filesystem/File.html#browseForDirectory() which does what I want but it only seems to work inside Adobe AIR and is not exposed to the browser.

Any suggestions would be highly appreciated.

Thank you.


As far as I know what you're trying to do is not possible unless you are running an AIR application. It would be helpful to know what it is you intend to do with the selected file/files... good luck!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号