http://bbs.airia.cn/thread-43301-1-1.htm
使用textLayout跟aswing实现图文混排遇到的问题。
http://bbs.9ria.com/viewthread.php?tid=53558 l
找到一个官方对TextFlow动态创建的说明
http://docs.huihoo.com/flex/4/flashx/textLayout/conversion/TextConverter.html
结合例子:
http://blog.csdn.net/huanghr_1/archive/2011/02/27/6211639.aspx
新浪微博AIR的图文混排表情出来啦。只是使用<img source=url 装入的图像不能播放gif,即只显示第一帧,不知道bmp图片能不能显示,有些flash的做法是将gif load进来后在play,将表情作为独立的覆盖层。
结合
补充一个demo
http://www.roseindia.net/tutorial/flex/flex4/components/richeditabletext.html
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" >
<fx:Script>
<![CDATA[
public function clear():void{
ricTxt.text="";
}
]]>
</fx:Script>
<s:Panel title="RichEditableText Example" width="335" height="203" color="#990000">
<s:VGroup x="12" y="6" width="311" height="154">
<s:HGroup>
<s:Group x="100" y="0">
<s:RichEditableText id="ricTxt"
editable="true"
selectable="true"
width="310"
height="124"
paddingTop="5"
paddingLeft="5"
paddingBottom="5"
paddingRight="5"
color="#000000"
lineBreak="toFit">
<s:textFlow>
<s:TextFlow>
<s:p>This is a RichEditableText component of flex 4. It has feature of writing, editing text in multiple lines. It too have the hyperlinks, scrolling, selection properties.
At runtime of application you can edit and can format the paragraph also.
To visit: <s:a href="http://www.roseindia.net">Roseindia.net</s:a> hold CTRL key and then click.
</s:p>
</s:TextFlow>
</s:textFlow>
</s:RichEditableText>
<s:Rect width="100%" height="124">
<s:stroke>
<s:SolidColorStroke color="blue"/>
</s:stroke>
</s:Rect>
</s:Group>
</s:HGroup>
<s:HGroup>
<s:Button id="clr" label="Reset" click="clear()"/>
</s:HGroup>
</s:VGroup>
</s:Panel>
</s:Application>