This doesn’t make sense. I have this code that works, and as soon as I try to read an attribute, or another node, it doesn’t work.
var total = xmlNode.childNodes.length;
for (var i=0; i<total; i++) {
enContent* = xmlNode.childNodes*.childNodes[0].attributes.image;
entryTitle* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
trace(enContent*);
trace(xmlNode.childNodes*.childNodes[0].attributes.image);
}
RETURNS IN OUTPUT:
undefined
display.jpg
undefined
compmass.gif
undefined
foam.jpg
undefined
axon.gif
The problem is, entryTitle and description both work! If I copy entryTitle* and name it as entryTitle2* and put a trace on that, only the original works.
What gives? Why is Flash only reading those two?