actionscript 3 - AS3 / AIR - Creating a plain text file? -



actionscript 3 - AS3 / AIR - Creating a plain text file? -

is possible create plain text file as3 or air?

example: create plain text file named "mytextfile.txt", have contain text reads "this text file." , save desktop.

another alternative have file exist in directory, have rewrite contents - assuming easier.

all of should happen background process, without save dialoge panel appearing.

var file:file = file.desktopdirectory.resolvepath("mytextfile.txt"); var stream:filestream = new filestream(); stream.open(file, filemode.write); stream.writeutfbytes("this text file."); stream.close();

actionscript-3 file air plaintext

Comments