其實flex是沒有頁面跳轉這壹種說法的。
我壹般用的跳轉有2種方法:
1.(推薦)引用flash中的importflash.external.ExternalInterface這個接口,他能提供像jsp中window.location.href方法壹樣方便,Flex頁面跳轉主要代碼為:
ExternalInterface.call("function()
{window.location.href='http://localhost:8080/JavaWeb_Flex_Demo/bin/hello.html';}
");
2.(總是彈出新的view,而不是只改變url)
使用navigateToURL,主要方式如下:
varurl:String="http://localhost:8080/JavaWeb_Flex_Demo/bin/hello.html";
varrequest:URLRequest=newURLRequest(url);
navigateToURL(request,"_blank");