读书人

Flex s:Label 设立超链接

发布时间: 2012-09-20 09:36:50 作者: rapoo

Flex s:Label 设置超链接

在Flex中,需要在label上设置一个超链接,类似与html中的超链接:

?

<a href="www.iteye.com">iteyer</a>

?

在Flex中可以如下设置,完成同样的效果:

?

<s:Label id="textLabel" buttonMode="true"
??? ??? ??? ??? ??? ?click="textLabel_clickHandler(event)" color="blue" text="link"
??? ??? ??? ??? ??? ?textDecoration="underline"/>

?

?

protected function textLabel_clickHandler(event:MouseEvent):void
{
??? ?? navigateToURL("http://www.baidu.com", "blank");???
}

?

? ?? ?? ?? ?<s:textFlow>
? ?? ?? ?? ?? ? <s:TextFlow>
? ?? ?? ?? ?? ?? ???<s:p>
? ?? ?? ?? ?? ?? ?? ?? ? <s:a href="http://www.51.com">51.com</s:a>
? ?? ?? ?? ?? ?? ???</s:p>
? ?? ?? ?? ?? ? </s:TextFlow>
? ?? ?? ?? ?</s:textFlow>
? ?? ???</s:RichEditableText>

?

?

读书人网 >flex

热点推荐