semtex
12-14-2005, 05:32 PM
Do you guys have any idea?
I have a flash file that loads xml data in a textfield.
The xml data contains html tags that need to be rendered in flash.
It works fine, except for some crucial tags like <b> and <i>.
I've tried <strong> instead of <b>, but it doesn't work either.
Any Idea what's wrong?
Here's a preview of the html text I try to load:
<strong>Dutch</strong> text.<br /><br />Hier komt wat tekst met <a href="http://www.google.be" target="_blank" title="google link">een link</a>. Iets <i>italic</i> en iets <b>vet</b>.<br />
And here's the actionscript i use:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild.childNodes[1];
var titel:String;
var tekst:String;
titel = xmlNode.childNodes[0].firstChild.nodeValue;
main.myTextField.htmlText = xmlNode.childNodes[1].firstChild.nodeValue;
bottom = main._y+mask_mc._height-main._height-space;
checkForHeight();
} else {
var tekst:String = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("content/"+_global.CONTENT+".xml.php");
I have a flash file that loads xml data in a textfield.
The xml data contains html tags that need to be rendered in flash.
It works fine, except for some crucial tags like <b> and <i>.
I've tried <strong> instead of <b>, but it doesn't work either.
Any Idea what's wrong?
Here's a preview of the html text I try to load:
<strong>Dutch</strong> text.<br /><br />Hier komt wat tekst met <a href="http://www.google.be" target="_blank" title="google link">een link</a>. Iets <i>italic</i> en iets <b>vet</b>.<br />
And here's the actionscript i use:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild.childNodes[1];
var titel:String;
var tekst:String;
titel = xmlNode.childNodes[0].firstChild.nodeValue;
main.myTextField.htmlText = xmlNode.childNodes[1].firstChild.nodeValue;
bottom = main._y+mask_mc._height-main._height-space;
checkForHeight();
} else {
var tekst:String = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("content/"+_global.CONTENT+".xml.php");