actionscript 3 - Writing and saving XML with AS3 -


i want create xml file , fill generated data. here code have. there no error not create file under same folder. air desktop project , if change filereference option pops dialog box , can save.

var objects = ["one","two","three"]; var values = ["1", "2", "3"]; var file = new file(); var filestream = new filestream(); file = file.applicationstoragedirectory.resolvepath("ayara.xml"); var myxmltag = "<ayar>";   for(var lp:int = 0; lp < 1; lp++) {     myxmltag += "<etkinlik>"     for(var = 0; < objects.length; i++)     {         myxmltag += "<" + objects[i] +  ">" + values[i] + "</" + objects[i] + ">";     }     myxmltag += "</etkinlik>"  } myxmltag += "</ayar>";  var xmlfinal:xml = xml(myxmltag ); filestream.openasync(file, filemode.write); filestream.writeutf(xmlfinal); 

am missing or executing things in wrong way? have checked posts handling xml files , there nothing different that.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -