In that last reply I posted it sending the sections to an array since that is useful. If you were going to repurpose those sections later in the movie...the arrays would come into play.
You may however simply want to send the values concatenated to a html enabled textfield if you have no need for the arrays created and only want a simple display.
Instead of displaying the raw arrays we could maybe:
http://actionscript.hobby-site.com/e.../freebie2.html
by using this script on frame 1 and making both textfields html enabled:]
Code:my_xml = new XML(); my_xml.load("./freebie.xml"); my_xml.ignoreWhite = true; my_xml.onLoad = function(Success){ if (Success){ dissect(); }else{ txt2.text= "xml error"; } }; txt1.htmlText="<u><b>Group 1 Users</b></u><br><br>"; txt2.htmlText="<u><b>Group 2 Users</b></u><br><br>"; function dissect() { i=0; for (p=0; p<my_xml.firstChild.childNodes.length; p++) { if(my_xml.firstChild.childNodes[p].childNodes[0].childNodes[0].nodeValue=="1"){ //in this example we drop the number from display since it's obvious //txt1.htmlText += my_xml.firstChild.childNodes[i].childNodes[0].childNodes[0].nodeValue+"<br>"; txt1.htmlText += "<b>"+my_xml.firstChild.childNodes[i].childNodes[1].childNodes[0].nodeValue+"</b><br>"; txt1.htmlText += my_xml.firstChild.childNodes[i].childNodes[2].childNodes[0].nodeValue+"<br>"; i++; }else{ //in this example we drop the number from display since it's obvious //txt2.htmlText += my_xml.firstChild.childNodes[i].childNodes[0].childNodes[0].nodeValue+"<br>"; txt2.htmlText += "<b>"+my_xml.firstChild.childNodes[i].childNodes[1].childNodes[0].nodeValue+"</b><br>"; txt2.htmlText += my_xml.firstChild.childNodes[i].childNodes[2].childNodes[0].nodeValue+"<br>"; i++; } } } } stop();![]()




Reply With Quote