In Macromedia Flex 1.5, there is a bit of fun to be had with htmlText in the <mx:Text> component. I was recently building an application in which I was displaying some content from a datasource when, for the strangest reason, some of the content just would not display. I plugged around for a while until I found the following:
I ran into a bug with <mx:Text> not displaying HTML correctly when embedded fonts are used. It turns out that the htmlText property cannot be used with embedded fonts unless you use a font tag specifying the font face in the htmlText.
There are two possible solutions:
One is to add a font tag around the dynamic content as shown below.
<mx:Text id="body_text"
width="432"
htmlText="<font face=''futura''>{ myResult.body }</font>"
/>
The other solution would be to edit the text being sent in so that it is enclosed in the same font tag.






0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment