Accessing File System


import flash.filesystem.*;

public class MyFile {
private var stream: FileStream;

private function saveFile(): void {

var file:File = File.desktopDirectory.resolvePath("file.txt");
var stream:FileStream = new FileStrem();
stream.open(fiel, FileMode.WRITE);
var str:String = "file content";
stream.writeUTFBytes(str);
stream.close();
}
}

Comments

Popular posts from this blog

What is Adobe Flash ?

Prototype based programming