ok, im about to pull ALL my hair out trying figure the tree model for accessing xml nodes in flash. just when i think i have it figured out…i don’t.
my XML file…
<?xml version="1.0" encoding="iso-8859-1"?>
<mag>
<item>
<name>.../images/randoms/1.jpg</name>
<width>400</width>
</item>
<item>
<name>.../images/randoms/2.jpg</name>
<width>250</width>
</item>
<item>
<name>.../images/randoms/4.jpg</name>
<width>400</width>
</item>
</mag>
my flash as…
//loads my photos CORRECTLY (using for loop)
p.loadMovie(nodes*.firstChild.childNodes[0].nodeValue);
so why doesn’t the code below load the widths??
p.loadMovie(nodes*.firstChild.childNodes[1].nodeValue);
when i trace this…
trace(nodes*.childNodes[1]);
i get “<width>400</width>,<width>250</width>, etc” so i add “.nodeValue” to the end of the trace and then it returns NULL.
my head hurts! can anyone point me in the right direction or to a good tutorial? thanks!