Does setName function (AS 3.0) alter XML file?

Sofia

New Member
I am quite new to dealing with xml files through Flash and Action Script 3.0.I write this piece of code with the intention of changing all the QUESTION children into WRONG.\[code\]var urlRequest:URLRequest = new URLRequest("question.xml"); var urlLoader:URLLoader = new URLLoader(); urlLoader.dataFormat = URLLoaderDataFormat.TEXT; urlLoader.addEventListener(Event.COMPLETE, urlLoader_complete, false, 0, true); urlLoader.load(urlRequest); private function urlLoader_complete(e:Event):void { var question:XML = new XML(e.target.data); question.QUESTION.setName("WRONG"); trace("FINISH!"); }\[/code\]The program runs and I successfully got the word Finish traced. However when I check the xml file question.xml, not one of the QUESTION children is renamed.Can someone explain this for me?Thanks a lot
 
Back
Top