Problems with getting data from an xml file - please help


hi, new attempting data xml file load in flash. followed tutorial in new fla , seemed work fine, tried adapt own needs worked fine. when trying implement news section doesn't seem work.
i trying make news section, displays date , news article. in within movie clip, tried putting in timeline of scene still nothing.

- have 2 dynamic text boxes, date_txt , news_txt
- xml file named news.xml,
- both fla , xml in same folder



this actionscript using:

function loadxml(loaded) {

if (loaded) {

_root.thedate = this.firstchild.childnodes[0].childnodes[0].firstchild.nodevalue;
_root.thenews = this.firstchild.childnodes[0].childnodes[1].firstchild.nodevalue;
date_txt.text = _root.thedate;
news_txt.text = _root.thenews;
} else {
trace("file not loaded!");

}

}
xmldata = new xml();
xmldata.ignorewhite = true;
xmldata.onload = loadxml;
xmldata.load("news.xml");




this have in xml document:

<?xml version="1.0"?>

<news>
<article>
<date>date</date>
<news>newentry.</news>
</article>
<article>
<date>doug engelbart</date>
<news>invented mouse @ stanford research institute</news>
</article>
</news>



does perhaps have ideas of problem be?

help appreciated.



More discussions in Adobe Animate CC - General


adobe

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support