1 Reply Latest reply on Mar 8, 2009 6:13 PM by John Hall

    Can't Wrap Text Around an image

    ljefferiesz1979
      Hi I'm trying to wrap text around an image in adobe flex 3 i always want the image to be in the upper left hand corner of a Vbox or canvas or whatever with the text neatly wrapping around it. im using an xml list to generate the image and the surrounding text I no it cant be done using htmlText but it does not make the text appear exactly as I would like it involves to much editing of the text so i would like to know f there is another way of doing so i can pull the text in without havingto convert it to html

      many thanx
      lloyd
        • 1. Re: Can't Wrap Text Around an image
          John Hall Level 4
          Have you tried just putting the text in line with the pic and call it htmltext, even if it's not? I suppose it depends on if you have some characters that should be escaped but embedding the image should always be up at the upper left. Something like the following with your own pic.jpg.

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
          <mx:Script>
          <![CDATA[
          [Bindable]
          public var htmlString:String="<img src='Assets/pic.jpg' align='left'/>This is just some sample text & some things that should be escaped like it's time to check to see if this thing wraps OK. This is just some sample text & some things that should be escaped like it's time to check to see if this thing wraps OK. This is just some sample text & some things that should be escaped like it's time to check to see if this thing wraps OK. This is just some sample text & some things that should be escaped like it's time to check to see if this thing wraps OK. This is just some sample text & some things that should be escaped like it's time to check to see if this thing wraps OK. This is just some sample text & some things that should be escaped like it's time to check to see if this thing wraps OK. This is just some sample text & some things that should be escaped like it's time to check to see if this thing wraps OK. ";
          ]]>
          </mx:Script>
          <mx:TextArea htmlText="{htmlString}" x="62" y="51" width="483" height="397"/>
          </mx:Application>