Hey yall trying to get an xml with only text reading into some text fields. I have the following for code:
My AS
var x:XML = new XML();
x.ignoreWhite = true;
var text1:Array = new Array();
var text2:Array = new Array();
var text3:Array = new Array();
x.onLoad = function() {
var contentText:Array = this.firstChild.childNodes;
for(i=0;i<contentText.length;i++) {
text1.push(contentText*.attributes.textCon1);
text2.push(contentText*.attributes.textCon2);
text3.push(contentText*.attributes.textCon3);
}
t1.textArea.text = textCon1*;
t2.textArea.text = textCon2*;
t3.textArea.text = textCon3*;
}
x.load("words.xml");
My XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<phrase>
<contentText>
<textCon1>"1"</textCon1>
<textCon2>"2"</textCon2>
<textCon3>"3"</textCon3>
</contentText>
</phrase>
It doesnt seem to be loading correctly any ideas?
Thanks in advance.
MT