Flex:[案例] Flash Builder 4中扩展TextLayout完美支持嵌入表情传输 转

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>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值