<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initApp()"
layout="absolute" width="278" height="244">
<mx:Script>
<![CDATA[
internal function initApp():void{
var str:String = "<a target='_blank' href='http://hi.baidu.com/hxd0818/'>paraliseinhell</a>";
link.htmlText = str;
}
private function toUrl():void {
var urlstr : String = "http://www.baidu.com";
navigateToURL(new URLRequest(urlstr),"_blank");
}
]]>
</mx:Script>
<mx:Button x="72" y="117" label="paraliseinhell" fontSize="13" id="link2" click="toUrl()"/>
<mx:Text id="link" text="paraliseinhell" x="72" y="47" fontSize="13"/>
</mx:Application>
要图方便,可以考虑这种形式: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initApp()"
layout="absolute" width="278" height="244">
<mx:Script>
<![CDATA[
internal function initApp():void{
var str:String = "<a target='_blank' href='http://hi.baidu.com/hxd0818/'>paraliseinhell</a>";
link.htmlText = str;
}
private function toUrl():void {
var urlstr : String = "http://www.baidu.com";
navigateToURL(new URLRequest(urlstr),"_blank");
}
]]>
</mx:Script>
<mx:Button x="72" y="117" label="paraliseinhell" fontSize="13" id="link2" click="toUrl()"/>
<mx:Text id="link" text="paraliseinhell" x="72" y="47" fontSize="13"/>
</mx:Application>
xx.htmlText=" <a href='xxxx'>"