I’ve got an xml file like so:
<projects>
<market title="Retail">
<label1 title="mall renovations">
<images pic1="" pic2="" />
<description title="Thanks" desc="this is *** gil on the horizon" />
</label1>
<label2 title="mall renovations">
<images pic1="" pic2="" />
<description title="Thanks" desc="this is *** gil on the horizon" />
</label2>
<label3 title="big box retail">
<images pic1="" pic2="" />
<description title="Thanks" desc="this is *** gil on the horizon" />
</label3>
<label4 title="theaters">
<images pic1="" pic2="" />
<description title="Thanks" desc="this is *** gil on the horizon" />
</label4>
<label5 title="mall renovations">
<images pic1="" pic2="" />
<description title="Thanks" desc="this is *** gil on the horizon" />
</label5>
<label6 title="mall renovations">
<images pic1="" pic2="" />
<description title="Thanks" desc="this is *** gil on the horizon" />
</label6>
<label7 title="mall renovations">
<images pic1="" pic2="" />
<description title="Thanks" desc="this is *** gil on the horizon" />
</label7>
<label8 title="mall renovations">
<images pic1="" pic2="" />
<description title="Thanks" desc="this is *** gil on the horizon" />
</label8>
</market>
</projects>
and an as file like so:
function setProjects(which:Number) {
for (var i:Number = 0; i < 8; i++) {
var labels:Array = new Array();
labels.push(projXML.firstChild.childNodes[which].childNodes*.attributes.title);
trace(labels);
}
}
problem is, that trace traces on separate lines, not an array of values. it’s like as if the push was replacing each object instead of adding it to the array, because if i trace the length of it it comes out to one. i’ve done this so many times before and for some reason i’m brainfarting on it and can’t figure out why its doing so.
Thanks in advance for any help offered.