It's actually quite simple to add a link through XML. For testing purposes, I'll describe a simple UI. Open up Flash and add a simple dynamic text field to the stage. Let's give it an instance name of textfield.
Next, open up the Actions panel, and add the following AS:
Code:
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {
textfield.html = true;
textfield.htmlText = this.firstChild.childNodes[0].childNodes[0];
}
xml.load("test.xml");
This should be familiar to you if you're already using XML. Note that I'm turning on the html property of the text field.
Next, create a XML document saved as test.xml with the following contents:
Code:
<xml>
<link><a href="http://www.google.com">Google</a></link>
</xml>
Finally, go back to Flash and test. You should have a working link.
Note: If you're using XML and flat text files, you're probably over-complicating your workflow.
Bookmarks