Answers

Question and Answer:

  Home  Adobe Flex Actionscript

⟩ Can you write to the file system from flex?

Yes .

import flash.filesystem.*;

private var stream:FileStream;

private function saveFile():void{

var file:File = File.desktopDirectory.resolvePath("HelloWorld.txt");

var stream:FileStream = new FileStream()

stream.open(file, FileMode.WRITE);

var str:String = "Congratulations on your 1st file, Rich Tretola - EverythingFlex.com";

stream.writeUTFBytes(str);

stream.close();

mx.controls.Alert.show("File has been saved to n" + file.nativePath, "Notice");

 227 views

More Questions for you: