Flex 3 / Air: Writing blank new lines to files using FileStream
- by Edward
I want to write some text directly to a file using Flex 3 / Air. The text on the file (call it "Database.txt") must have the following format:
Line1
Line2
Line3
var FS:FileStream = new FileStream();
var DatabaseFile:File = File.desktopDirectory.resolvePath("Database.txt");
FS.open(DatabaseFile, FileMode.WRITE);
FS.writeUTFBytes("Line1" + "\n" +…