开发者

ActionScript3: how to get real url of page in which swf is placed?

So I tried

            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"
            }

and

            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"
            }

and FlexGlobals.topLevelApplication.url but it all gives same=(

but thay bouth return me to http://127.0.0.1/w2/window.swf while I had url http://127.0.0.1/w2/wind开发者_Python百科ow.php?action=read#1. I use flash builder. So what shall I do to recive real full link - not swf link?


What about

var _url:String = flash.external.ExternalInterface.call("window.location");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜