tags:

views:

60

answers:

2

Using the flex text area I am trying to put an image inside a list. Whatever I do, the image is pushed to a new line. If anyone has dealt with this before would more than appreciate a pointer as to whether it can be done. The html is below. I want to show text and the image on the same line in list item 2. I have taken some of the formatting out for readability.

 <TEXTFORMAT ><LI><FONT  SIZE="18">1 some text</FONT></LI></TEXTFORMAT>
 <TEXTFORMAT><FONT SIZE="18">2 some <FONT COLOR="#0000FF">
 <A HREF="event:http://bbc.co.uk" TARGET="_blank">
 <img id='testImage' src='embed.AcceptIcon' width='16' height='16'/>   
 </A></FONT></FONT></LI></TEXTFORMAT>
  <TEXTFORMAT ><LI><FONT SIZE="18">3 some text after the image.</FONT></LI></TEXTFORMAT>
+1  A: 

From the Adobe LiveDocs :

In general, an image embedded in a text field appears on the line following the tag. However, when the tag is the first character in the text field, the image appears on the first line of the text field.

Robert Bak
Read the docs eh? Thanks, that helped. Can get it working but as soon as the image is embedded in a list item, things start to look ugly. The bullet points disappear and well.. They(adobe) are gonna real have to sort this html support out.
Chin
+1  A: 

This is a limitation of the older text engine currently used by Flash 9/10 and below. Anything which uses flash.text.TextField (such as Flex 2 & 3) will have this problem.

However, Flex 4 (and Flash 10) now have rich text support, which provides some really interesting features. Inline images are one of them. Because the engine (flash.text.engine) is really powerful, using it can be rather complex. However, Flex 4's text UI now wraps the text engine, so it should be provided for you for free.

Example:

http://www.bytearray.org/?p=499

Also, search for "text ligature" in theflashblog.org site

Rizwan