I am still quite new to the whole flash XML thing, but I am struggling…
Heres my XML:
<?xml version="1.0"?>
<news>
<newsarticles>
<article head = "This is the first Story"/>
<article1>
<![CDATA[Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore
magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip
ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum
lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril
delenit augue duis dolore te feugait nulla facilisi.]]>
</article1>
</newsarticles>
</news>
Heres my Actionscript:
var my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.load = function(success){
if(success){
var article = my_xml.firstChild.firstChild.childNodes;
heading1.text = article.attributes.head;
trace(article);
}else{
trace("Error loading file");
}
}
my_xml.load("news.xml");
When trying to load it into the text box: heading1, I get an undefined. I am just trying to get the attribute value into this text box, but I am getting an undefined in the flash. Any help would be apprecitaed, and just to let me know what I am doing wrong…
Thanks in advance!