2016-10-13 00:16:48 点击量:11 标签: 收藏本文
Alert.show(this.loaderInfo.url);输出:
http://localhost/transport/bin-debug/index.swf
应该怎样才能获取带参数的地址呢?例如:
http://localhost/transport/bin-debug/index.html?555=%B9%E3
我这样搞掂了:
var nowURL:String = ExternalInterface.call("window.location.search.substring",1);
this.loaderInfo.url 是指SWF文件自己的路径(不带后面的参数)
参数在loaderInfo.parameters集合中
ExternalInterface.call("window.location.host.toString();") 是使用JS读取地址栏,必须在支持JS的环境中才有效.
地址栏中的地址和SWF的路径是两回事