01-24-2011 10:14 AM
My app has some as3 sprites in it (that the user modifies), what would be the best way to save these so the user can open them again if they close the app?
01-24-2011 10:27 AM
You wouldnt save the Sprite itself, but the characteristics of the sprite to restore it's state. For example: x,y,rotation,size,color,etc. Depending on the number of sprites and the complexity of the information, either XML or SQLite, which ever you are more comfortable with.
01-24-2011 12:13 PM
var myFile:File = File.desktopDirectory.resolvePath("MyNewFile.txt")
; var fileStream:FileStream = new FileStream(); fileStream.open(myFile, FileMode.UPDATE); fileStream.position = 10; fileStream.writeUTFBytes("AIR"); fileStream.close();
Ok thanks, I found this example to write to my desktop, how could I make it write to the device?
01-24-2011 12:23 PM
Such information can be found in the webcasts: Developer resources. You can download the slides and see lots of example source code.