Saving files with and without prompts using AIR AS3

Couple of bits of code for saving files using AIR: This way does not open the save dialogue, just saves it automatically. var stream:FileStream = new FileStream(); var saveFile:File = new File(); saveFile = saveFile.resolvePath(String(courseStructureURL)); var fileStream:FileStream = new FileStream(); fileStream.openAsync(saveFile, FileMode.WRITE); fileStream.writeUTFBytes(String(Structure.xml)); fileStream.addEventListener(Event.CLOSE, fileClosed); fileStream.close(); function fileClosed(e:Event):void { Utils.alert("The course has been updated successfully.");... Continue Reading →

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑