Displaying dynamic text from an xml file
I am attempting to display dynamic text from an external xml file. When I trace for the variable, all is well in the output window. But the text does not display in the published movie.
Here is my current code:
var myXML:XML;
var myLoader:URLLoader = new URLLoader();
myLoader.load(new URLRequest("AskAnExpert.xml"));
myLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(e:Event):void {
myXML = new XML(e.target.data);
var topic1:String = myXML.TOPIC[0].TOPIC_NAME;
trace(topic1)
};
On-screen, I have a dynamic text field with an instance name of topic1. When I play the movie, the text does not display. I've tried various options of embedding the text and using _sans, but that doesn't seem to do the trick either. Help!
