简体   繁体   中英

Create folder and directory in actionscript

As a part of flash application, I'm trying to store recorded files automatically to a specific path on users computer hard disk without they be aware. Is there a way to create directory in actionscript?

If you are using Flash in a web browser, for security reasons there is not. the only option to store something locally within a web browser is to use shared objects (kind of like cookies), but this is likely not what you want.

If you are not in a web browser you can use either AIR or a third party wrapper such as Multidmedia Zinc (for an additional cost).

File options for AIR can be found here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html

File options for Zinc can be found here: http://www.multidmedia.com/support/livedocs/zinc/4.0/

EDIT

Since in your comment it sounds like your running in a web browser, you should leave it at simply streaming it to your server. If they have no internet connection there is no other good option other than live streaming using URLRequest , that is, if you are within a web browser.

Here is some additional reading on this subject:

Can Flash action script read and write local file system?

There's a tutorial at http://hub.tutsplus.com/tutorials/create-a-useful-audio-recorder-app-in-actionscript-3--active-5836?request_uri=%2Ftutorials%2Factionscript%2Fcreate-a-useful-audio-recorder-app-in-actionscript-3 which does exactly what you want. Ignore the timeline-driven approach if you wish.

It uses the micrecorder library from https://code.google.com/p/micrecorder/ which records the audio and offers a file for the user to download at the end.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM