This is a super simple XML data pull… not sure why it isn’t working. Any ideas what I’ve done wrong?
The dynamic text field has been labeled as "prizepool_formatted_txt’
The actionscript is
function loadXML(loaded) {
if (loaded) {
_root.prizepool_formatted = this.firstChild.childNodes[0].childNodes[3].firstChild.nodeValue;
prizepool_formatted.text = _root.prizepool_formatted;
} else {
trace("file not loaded!");;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("http://www.mydomain.com/prizepool.xml");
and the XML file is formatted like so:
<data>
<updated>March 17, 2006, 8:04 am</updated>
<timestamp>1142604293</timestamp>
<prizepool>1034</prizepool>
<prizepool_formatted>$1,034</prizepool_formatted>
</data>
Keep getting “undefined” error! Any help would be greatly appreciated.