textArea加链接和textField加链接是一样的,你添加链接的方法不对头:
下面这个是textField加链接的,你的组件和这个添加链接的方法是一样,你测试下下段代码就明白了
见代码:
var showTxt:TextField = new TextField();
showTxt.border = true;
showTxt.width = 200;
showTxt.height = 100;
addChild(showTxt);
showTxt.htmlText+="昵称:"+ ""+""+"nickname"+""+"";
showTxt.addEventListener(TextEvent.LINK, linkHandler);
function linkHandler(eve:TextEvent):void
{
trace(eve.text);
var url:URLRequest=new URLRequest(eve.text);
navigateToURL(url);
}