Flex 实现类似HTML里的<A>标签的超链接功能
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:view="view.*" creati>
<mx:String id="test">
<![CDATA[<a href="event:"><u>click</u></a> label]]>
</mx:String>
<mx:Script>
<![CDATA[
import mx.controls.Label;
import mx.controls.Alert;
private function initApp():void
{
var lbl:Label = new Label();
lbl.htmlText = test;
lbl.selectable = true;
lbl.addEventListener(TextEvent.LINK, label_link);
this.addChild(lbl);
}
private function label_link(evt:TextEvent):void {
Alert.show("click .");
//这里处理你要进行的跳转
}
]]>
</mx:Script>
</mx:Application>