load and save files for mobile and desktop
I saved a file in a similar way(File.desktopDirectory.resolvePath("test.txt")) because I couldn't figure out how save a file in my swf folder that gets uploaded to to the android. Now I tried to access the file this way but i get
Error: Error #2030: End of file was encountered. at flash.filesystem::FileStream/readUTF()
var myFile:File = File.desktopDirectory.resolvePath("test.txt");
var fileStream = new FileStream();
fileStream.open(myFile, FileMode.READ);
//the file is not gone
var fileText:String = fileStream.readUTF();
fileStream.close();
trace(fileText)
I have used URLRequest = new URLRequest("test.txt") but I dont know how to get to the document folder that way and I dont know if a path would work for android and computer
maybe sharedObject is the better way to go for storing data but I am more comfortable using xml files
I have spent hours on this that is just the latest attempt
