1.

Can You Write To The File System From Flex?

Answer»

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”);

Yes.



Discussion

No Comment Found