1 Reply Latest reply on Mar 17, 2010 9:39 AM by Flex harUI

    TextFlow <img /> problem !


      Dear friends in Adobe,

      There is a simple question here:

      When we are using textFlow in our project, and when we want import some html tags in it, specially when our textFlow obj. is in a Module, for example:

      <mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" 
           layout="absolute" width="100%" height="100%"
                <!-- Place non-visual elements (e.g., services, value objects) here -->
                import flashx.textLayout.conversion.TextConverter;
                internal var Pvar:String = new String();          
                public function func():void{          
                     Pvar = "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008'>"+
                            "<div><span color='#ff0000'>some text here</span><br />"+
                            "<div><img id='img1' source='Sunset.jpg' /></div>"+
                     rtxt.textFlow= TextConverter.importToFlow(PoetsBCvar2, TextConverter.TEXT_LAYOUT_FORMAT);               
           <s:RichText id="rtxt" />

      everything is allright, except showing the image file !

      and it will shown if we set both of width and height attributes in the <img... tag, just like this:

      "<div><img id='img1' source='Sunset.jpg' width='100' height='100' /></div>"

      I wonder if it could show the image without setting these attributes in default size, that was not so better and easier?!