AS2 - Loop crashing flash player
I'm loading an XML that has grown quite large and putting the contents into one textbox. There were no issues when the XML was small but after it grew in size I noticed it started hanging FLASH and occasionally crashing it all together.
I have one loop inside another to structure the contents in the textbox the way I need it. It's the second loop that is causing the crash. Does anyone have a better suggestion for doing this?
Code:
for (i=0; i<total; i++) {
headline[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
date[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
copy_intro[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
image_large[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
copy_full[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue;
txt_mc.txt.htmlText = adddate;
for(a=0; a<total; a++){
txt_mc.txt.htmlText += headline[a] +"\n"+date[a]+"\n"+copy_full[a];
}
}
Thanks for taking a moment to look at this, I'm not a natural coder so any and all help is greatly appreciated.
Best,
Kumba