Hello people,
I am having some problems gaining a response from this and am wondering what I am doing wrong.
The information can be found here, http://www.foundation-flash.com/tutorials/xml/ , however for those of you too lazy to click the link, here it is.
My Flash action script is as follows
var cats_xml = new XML();
cats_xml.onLoad = function(loaded){
if (loaded){
trace(cats_xml.firstChild.firstChild.nodeValue);
trace(cats_xml.firstChild.firstChild.nextSibling.nodeValue);
}
}
cats_xml.load(“cats.xml”);
and my XML is as follows
<cats>
<title>
CATS!
</title>
<cat>
Meow!
</cat>
<cat>
Meow!
</cat>
<cat>
Meow!
</cat>
<cat>
Meow!
</cat>
<cat>
Meow!
</cat>
</cats>
to the best of my knowledge this should produce an output ie trace of
CATS!
Meow!
however when I try and publish my movie i get an output of “null”
can any one explain to me why I am not getting the desired output.
please help as I have been trying to sort this for a couple of days now and it doing my head in.
Any help would be very much appreciated
Cameron
P.S. Please bear in mind I am fairly new to actionscript and xml so please treat me like an idiot.