六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 56|回复: 0

flex中嵌入html的例子

[复制链接]

升级  10%

15

主题

15

主题

15

主题

秀才

Rank: 2

积分
65
 楼主| 发表于 2013-2-7 15:32:46 | 显示全部楼层 |阅读模式
<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">   <mx:Script>   <![CDATA[   public var htmltext:String = "This <u>is</u> a <br> <font color=\"#0000ee\" >HTML-formatted</font> text."   ]]>   </mx:Script>  <mx:Panel title="Label Example" height="600" width="800" paddingTop="10" paddingLeft="10">   <mx:VBox borderStyle="inset">      <mx:Label id="simpleLabel" text="Label text." fontSize="12" width="400" enabled="true"/>        <mx:Label id="htmlTextLabel" htmlText="{htmltext}">      </mx:Label>    </mx:VBox>    <mx:VBox borderStyle="inset" visible="true">  <mx:Text width="100%">            <mx:text>                This is a multiline,                 non-editable text component.             </mx:text>        </mx:Text>        <mx:Text width="100%">            <mx:htmlText>                <![CDATA[This is <br><font color="#FF0000">HTML text</font> in a <b>Text component</b>.]]>            </mx:htmlText>        </mx:Text>  </mx:VBox>      <mx:VBox borderStyle="inset" visible="true">  <mx:TextInput id="textinput" text="Hello World!"  displayAsPassword="true"/>    </mx:VBox>      <mx:VBox borderStyle="inset" visible="true">      <mx:TextArea width="500" height="50">       <mx:htmlText>      <![CDATA[      This is a TextArea.<br><font color="#FF0000">HTML text</font>      ]]>      </mx:htmlText>            </mx:TextArea>  </mx:VBox>    <mx:VBox borderStyle="inset" visible="true">  <mx:RichTextEditor id="rte" title="RichTextEditor" width="500" height="200" text="RichTextEditor display your text as plain text, or as HTML-formatted text."/>  </mx:VBox>     </mx:Panel></mx:Application>
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表