in a rush

experience is everything

in a rush header image 2

Flex 1.5 htmlText Property

January 28th, 2006 · No Comments

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.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • StumbleUpon
  • Technorati

Tags: Uncategorized

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment