Create and save files with flash using AS 3.0

I wonder how can I create file using ActionScript 3.0 and save it? Is this is possible without using any other language? If it’s not which is the best way to create a project which will save some data to the hard drive. How can I store some variables for example in txt file ot xml file?

Actionscript is pretty bad at writing files. In fact, it’s so bad it can’t! : )

You need to make use of php/asp/aspx or a similar SS scripting language that is called from flash.

I hoped there could be some way to do this :slight_smile: 10x for the answer

Is this application going to run in the browser or not?

If it is, then you could consider either waiting for Flash Player 10 to come out or force all of your users (if you have a controllable environment like an office) to download the beta. FP10 has the capability to save files directly to a hard drive without using another language. If you need to use an older version of Flash, then the best way has always been to follow sekasi’s suggestion.

If it’s going to be a desktop application of some sort, then you could you AIR’s file API.

It’s going to be a desktop application. I can use AIR to do this?

If your target users have AIR or would not mind installing AIR, then yes, you could use the flash.filesystem package to write the file.