This content has been marked as final. Show 7 replies
You have to embed the font outlines - and special characters - for italic and bold too.
thanks LuigiL. i've tried it but I think my problem lies somewhere else.
my xml file:
<item title="The TEST"><![CDATA[ <b>test bold</b> normal text <i>italic text</i> ]]></item>
and in flash I have an textfield prepared, that has html set to on. and I'm also embedding all the outlines. Next to it I have two additional text fields with the bold and the italic outlines placed on the timeline, also with the embedded fonts.
then the actionscript:
var yt:String = getTheExternalXMLString()...
yellowstickerMC.txtMC.html = true;
yellowstickerMC.txtMC.htmlText = yt;
and flash spits out the following in the text field:
<b>test bold</b> normal text <i>italic text</i>
??? Thanks :)
Are you using the onData event for your xml-object? If so, that should be the onLoad event otherwise the xml won't get parsed.
I use onLoad. the text comes through, its just that the html within the Cdata tag is not being recognized as html, but just as plain text. the xml file content does come through and is being displayed, so on that end things are working,
Try bypassing the getTheExternalXMLString() method and put in the html part directly in the text field.
I got it... Thanks LuigiL for helping me debugging. Now I'll have a reference for this issue. Here's the solution:
Use firstChild.nodeValue instead of childNodes.
here's the adobe link on the subject:
There you go. And I learned to ask for the xml parsing code too... I'm off to bed!