I'm currently working on a weather app for my assignments. I will like to know if there is a way for me to write more than one item in the fileStream. Or do i need to make a new fileStream to access the other information.
This is my code which is writing in my towns.
var fileStream:FileStream = new FileStream();
//write file
function writeFile(town:String):void{
fileStream.open(file,FileMode.WRITE);
fileStream.writeUTFBytes("<root>\n\t<town>" + town + "</town>\n</root>");
// \ escape \n means new line
fileStream.close();
}
No comments:
Post a Comment