加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-15 01:26:27 所属栏目:百科 来源:网络整理
导读:http://bbs.airia.cn/thread-43301-1-1.htm ? 使用textLayout跟aswing实现图文混排遇到的问题。 在mx组件的时候就将一个sprite通过这样:canvas.rawChildren.addChild(sprite);就可以将图片文字一起显示,而我用aswing组件实现的时候是这样写的:var sprite=

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>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读