Hello. I have an xml doc that I am loading into flash. One problem is that I need these two items medDesc and medname to load all info in these areas. Right now, it only loads the zero value (or which ever specific number you put in brackets)…meanwhile, there are up to 7 items that could be here.
Does anyone know how to load all the values…Randomly, if possible.
import mx.utils.Delegate;
var chemomeds:Array;
var xml:XML = new XML();
function onXmlLoaded(success:Boolean) {
if (success) {
var mainnode:XMLNode = xml.firstChild;
var chemomedsnodes:Array = xml.firstChild.childNodes;
for (var i:Number = 0; i<chemomedsnodes.length; i++) {
var categorynode:XMLNode = chemomedsnodes*;
chemomeds.push({i:i+1,cname:categorynode.attributes.name,
**medDesc:categorynode.childNodes[0].firstChild,**
**medname:categorynode.childNodes[0].attributes.name**});
}
setup();
} else {
trace('error reading XML');
}
}
Thanks!