Here’s my script:
xmlTracks = new XML();
xmlTracks.load(“myXML.xml”);
xmlTracks.onLoad = tracksLoad;
function tracksLoad(success)
{
if(success)
{
for(var i = 0; i < this.childNodes.length; i++)
{
trace(this.childNodes*.nodeName);
}
trace(this.status);
}
else
{
trace(“error”);
}
}
Here’s the output:
tracks
null
0
and here’s the XML:
<tracks>
<song1 name=“one”/>
<song2 name=“two”/>
<song3 name=“three”/>
</tracks>
why does it print the null?