Is there a way of writing data into a text file without using AIR components in AS3 using flash. The save method of fileReference class opens up a file selection dialog box. Cant that method directly write data into some file withot opening he dialog ? Thanks in Advance
1 Answer
There are 3 ways to save file from Flash :
In AIR : use File class , You can manipulate files without user intervention .
In FlashPlayer : you can use FileReference class but for this user much choose in browse window where to save data
or You can use some proxy application and connect it via socket or local connection .
3 Comments
parvez
Sir, If i use AIR , i am unable to write by running the swf. This error pops up. VerifyError: Error #1014: Class flash.filesystem::File could not be found. Is there a way to solve this?
turbosqel
You cannot run single SWF and use this class , You have to compile AIR application file . Single SWF cannot execute native classes from AIR .
SketchBookGames
FlashDevelop includes a Run.bat which runs the swf in the AIR player giving it required AIR privileges like file access, w/o the install process.