http://hi.baidu.com/wptad/blog/item/5f8bc91381f50729dd540182.html
<mx:TextInput id="myInput" text="http://www.wptad.cn" x="161" y="124" width="228"/>
<mx:Button x="424" y="124" click="GoToUrl()" label="转到"/>
<mx:Script>
<![CDATA[
import flash.net.navigateToURL;
private function GoToUrl():void
{
navigateToURL(new URLRequest(myInput.text),"_blank");
}
]]>
</mx:Script>
http://blog.163.com/gameip@126/blog/static/1105995292009813239752/
text.mxml:
在这个文件里加一个方法:
//这个为转向其它页面
private function forward():void{
var strUrl:URLRequest = new URLRequest("main.html");//这个地址是Flex生成的html文件的地址
navigateToURL(strUrl,"_self");
}
//这个为打开一个新的窗口
private function forward():void{
ExternalInterface.call("window.open","http://www.google.com","_blank");
}