Hi!
I saw a great tutorial here which tells how to get data from xml -file to flash. Now I have ran into a problem with it. I dont know how to get multiple news from a xml file. Ok ok…This might be easy for a pro but fer me its a killer :h:
So plz. If you can advice me how to get through this …
================ code =================
function loadXML(loaded) { if (loaded) { _root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue; _root.comments = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue; name_txt.text = _root.inventor; comment_txt.text = _root.comments; } else { trace(“file not loaded!”);}} xmlData = new XML(); xmlData.ignoreWhite = true; xmlData.onLoad = loadXML; xmlData.load(“something.xml”);
=========== /code ================
How I load multiple xml news? I have 10 news to get and all I get is one…If I try to do this the hardwaý = multiplying:
_root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue; _root.comments = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue; name_txt.text = _root.inventor; comment_txt.text = _root.comments;
And changing the node properties/values (All this in one frame) I get just one news and its the last one specified in the code sigh…So lost with this… I know there SHOULD be easier and better way to do this… help me :te:
Esq