所以我试过
var url:String = String(this.loaderInfo.url);
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, '_self'); // second argument is target
} catch (e:Error) {
ErrorButton.label = "Please refresh page manually"
}
和
var url:String = String(this.loaderInfo.loaderURL);
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, '_self'); // second argument is target
} catch (e:Error) {
ErrorButton.label = "Please refresh page manually"
}
和FlexGlobals.topLevelApplication.url但它们都给出了相同的=(
但是当我有网址http://127.0.0.1/w2/window.swf
时,我会回复http://127.0.0.1/w2/window.php?action=read#1
。我使用flash builder。那么我该怎样做才能获得真正的完整链接 - 而不是swf链接?
答案 0 :(得分:7)
怎么样?
var _url:String = flash.external.ExternalInterface.call("window.location");