XML Flash problem! pls help!

Hi… am having some problems with displaying loaded xml in flash. The content had loaded successfully but am having problems displaying it into dynamic text fields named txtDate, txtTitle and txtDescription… any ideas? iv attached the xml aswel =)

var xmlNews:XML = new XML();

xmlNews.onLoad = function(){
_root.mcNews.txtDate = xmlNews.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.mcNews.txtTitle = xmlNews.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
_root.mcNews.txtDescription = xmlNews.firstChild.childNodes[0].childNodes[2].firstChild.nodeValue;
};

xmlNews.ignoreWhite = true;
xmlNews.load(“news.xml”);

[QUOTE=rkoes;2325588]Hi… am having some problems with displaying loaded xml in flash. The content had loaded successfully but am having problems displaying it into dynamic text fields named txtDate, txtTitle and txtDescription… any ideas? iv attached the xml aswel =)

var xmlNews:XML = new XML();

xmlNews.onLoad = function(){
_root.mcNews.txtDate = xmlNews.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
_root.mcNews.txtTitle = xmlNews.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
_root.mcNews.txtDescription = xmlNews.firstChild.childNodes[0].childNodes[2].firstChild.nodeValue;
};

xmlNews.ignoreWhite = true;
xmlNews.load(“news.xml”);[/QUOTE]

anyone?

If txtDate is the instance name of the text field you would have to use


_root.mcNews.txtDate.text = xmlNews.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;

[QUOTE=Digitalosophy;2325657]If txtDate is the instance name of the text field you would have to use


_root.mcNews.txtDate.text = xmlNews.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;

[/QUOTE]

yep thats the instance name… tried that stil doesnt work :m:

Worked for me. You have an fla I can see?

You embedded the font on the textfield? Worth creating a new text field, embedding the font, and try chucking the XML to that instead; sometimes the font embeds can go a bit squiffy. Just a thought :slight_smile:

il email u the files over digitalosophy, appreciate the help.