Natalia,
In saveXML, try:
appFile = File.applicationStorageDirectory.resolvePath("data/sets.xml");
Several quibbles with the code, but this should work...
HTH,
--Dave
> Ok, I understand. Where I must save my data?I have them in the same folder
> as fla file.
>
>
> 2014-03-01 16:58 GMT+04:00 Henrik Andersson <[email protected]>:
>
>> natalia Vikhtinskaya skriver:
>>> This is code in app
>>> var appDirectory:File =
>>> File.applicationDirectory;//File.applicationStorageDirectory
>>> var fileString:String = appDirectory.nativePath;
>>> var appFile:File = File.documentsDirectory;
>>> var
>>>
>> setsFile:String=fileString+File.separator+"data"+File.separator+"sets.xml"
>>>
>>> function initLoadXML():void{
>>>
>>> var XMLfile:File = File.applicationDirectory.resolvePath(setsFile);
>>>
>>> var myXMLLoader:URLLoader = new URLLoader(new URLRequest(XMLfile.url));
>>>
>>> myXMLLoader.addEventListener(Event.COMPLETE, setsLoaded);
>>> }
>>> function saveXML():void{
>>> var newFileStream:FileStream = new FileStream();
>>> appFile =
>>>
>> appFile.resolvePath(fileString+File.separator+"data"+File.separator+"sets.xml");
>>>
>>> newFileStream.openAsync (appFile, FileMode.WRITE);
>>> newFileStream.writeUTFBytes(xmlSets);
>>> newFileStream.close ();
>>> }
>>> Maybe here is something wrong with path or I store data in a wrong
>> place.I
>>> have xml in the folder data in the same folder as exe file with app.
>>>
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders