1 Reply Latest reply on Apr 19, 2009 1:18 PM by Michael Borbor

    Img tag inline  with text

    Mainmanian

      I realize that discussions on how to include an image/icon inline with text has been done before. It appears that this problem has not been solved yet. Does anyone know if it can be done or we have to live with an insufficient implementation of html in Flex? The code below is what I am trying to execute; have a small icon next to some text. Thanks in advance.

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:Script>
           <![CDATA[
               [Embed(source="assets/studentsImageIconSmall.jpg")] public var iconTest:Class;

       

           ]]>
      </mx:Script>
      <mx:TextArea width="100%" height="100%">
              <mx:htmlText>
                  <![CDATA[
                      <p>You can include an image in your HTML text with the &lt;img&gt; tag.</p><br>
                      <img src="assets/studentsImageIconSmall.jpg">Text next to the image.<br>
                      <img src="assets/studentsImageIconSmall.jpg">Text next to the image.<br>
                      <img src="assets/studentsImageIconSmall.jpg">Text next to the image.<br>
                  ]]>
              </mx:htmlText>
          </mx:TextArea>
      </mx:Application>