All pastes #496112 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-05-19 01:51 UTC
rendered paste body
on (release) 
{

var login_str:String = Search.text;
var my_xml:XML = new XML(login_str);
var myLoginReply_xml:XML = new XML();
myLoginReply_xml.ignoreWhite = true;
myLoginReply_xml.onLoad = myOnLoad;
my_xml.sendAndLoad("Search.php", myLoginReply_xml);
function myOnLoad(success:Boolean) {


myLoginReply_xml = new XML();
	
	mainTag2 = new XML();
	elementTag2 = new XML();
	dataList2 = new Array();
	elementList2 = new Array();
	mainTag2 = this.firstChild;
	
		if (mainTag2.nodeName == "dataSet") {
			gotoAndPlay(20);
			dataList2 = mainTag2.childNodes;
			for (i=0; i<=dataList2.length; i++) {
				if (dataList2[i].nodeName == "data") {
					elementList2 = dataList2[i].childNodes;
					for (j=0; j<=elementList2.length; j++) {
						elementTag2 = elementList2[j];
						elementType2 = elementTag2.nodeName;
						if (elementType2 == "questname2") {
							Name2 = elementTag2.firstChild.nodeValue;
						}
						if (elementType2 == "Solution2") {
							solution2 = elementTag2.firstChild.nodeValue;
						}
						if (elementType2 == "Submited2") {
							submited2 = elementTag2.firstChild.nodeValue;
						}
						if (elementType2 == "Reward2") {
							reward2 = elementTag2.firstChild.nodeValue;
						}

					}
					// Adds the label and data to the URL.
					var listData2 = { Solution2:solution2, Submited2:submited2, Reward2:reward2};
					listBox2.addItem(Name2, listData2);
				}
			}
		} 
	
	// Sets the change handler for the Component named 'dropDown'.
	listBox2.setChangeHandler("SelectItem2 ");



}

 
}