views:

462

answers:

1

I have a Flash project that I need to have save files to the users local machine. I had thought that Flash included tools for working with files, but apparently this won't be implemented until the Flash Player 10 is around.

I'm working with CS3 using ActionScript 3, and I thought that maybe the Jugglor tool JSave might be able to accomplish what I want to do, however the documentation for using JSave on anything after Flash MX is basically non-existant.

Does anyone know how to use JSave in ActionScript 3 to save a file or have a better solution for saving files in Flash?

Thanks

+3  A: 

If you are willing to take your application from the web and onto the desktop, Adobe AIR is your solution. By updating your Flash CS3 installation through Adobe Update Manager, you will be able to use Adobe AIR within the Flash application.

EDIT: If your app needs to stay on the web, you could use the AS3 class FileReference to instantiate an OS download dialog and have files saved to the user's computer that way, but you won't be able to dictate where on the user's system the file is created or whether it is created at all as this depends on what the user decides to do.

Depending on what you need to accomplish, you could use a Local Shared Object. This is essentially Flash's version of a cookie.

Stiggler
We have a web application in which we want to have similar functionality. Could you please give more explanation on how to save the file after creating the download dialog through `FileReference`?
Hosam Aly