I’ve created a text field, styled it with CSS imported through an XML fragment, etc., and almost everything works as it should.
The exception (of course!) is with <b> and <i> tags. I’ve included the relevant font outlines in my SWF, and the bold or italicized text does in fact show up, but here’s the thing: sometimes, the space between a word and the opening <b> or <i> tag disappears!
My text is all read in through XML <![CDATA[]]> blocks. If I had the following fragment:
<![CDATA[This is <b>bold</b> text. And this is <i>italic</i>.]]>
The output might looks like this:
This isbold text. And this isitalic.
Or it might looks like this:
This is** bold** text. And this is* italic*.
(which is how it should look!)
The problem is that the behavior changes according to the alignment of planets and phases of the moon or something I don’t know. I tried forcing an extra space between opening tags, which would correct it in the instances where the space is deleted, but it adds an extra space where it’s not! Ack!
Has anyone else run into this problem? Has anyone solved it? It’s driving me nuts!
(Flash CS5, AS3, fyi)