The reason why you get the error is that the textfield text is not available until the xml file is loaded, however you want to display the text before that. You need to either add the textfield script inside the completeXMLListener function or add an event dispatcher inseide of that function.
Ok, that's closer, but I still don't have it. I changed to this:
pageDetails = new XML(urlXMLLoader.data);
pageDetails = pageDetails.text
and got this:
TypeError: Error #2007: Parameter text must be non-null.
at flash.text::TextField/set htmlText()
TypeError: Error #1034: Type Coercion failed: cannot convert XMLList@217621c9 to XML.
So it didn't like the way I tried to convert. Can you be specific how to script this?
First of all, do not give the same identifiers to all variables. If myText is the identifier of the textfield then to get to the node you need to write:
var xmlData:XML = XML (event.target.data);
var pageDetails:String = xmlData.DETAILS.toString();
myText.text = pageDetails; //This is the home page.
Great. Almost there. The pageDetails var traces out the necessary; however, I had to change your line to this:
myText.htmlText = pageDetails;
because I'm += the myText var with htmlText, and in fact will substitute the pageDetails material with HTML text. When I run a trace after the above line, I get:
which, of course, is what I want. However, it prints nothing to the resultant swf page, so I'm obviously missing something. Please advise.
I am not familiar with your whole movie. So I don't know what you want to achieve in the end.
I took this to another list after not hearing back for a day. The problem was in calling Text(), which called the text variable, before actualizing the same. Have the credit anyways, since you helped a lot
I will add that to my credit report