获取当前浏览器 URL - ActionScript 3 [英] Get Current Browser URL - ActionScript 3

查看:44
本文介绍了获取当前浏览器 URL - ActionScript 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取当前浏览器网址.我已经尝试过外部呼叫,但没有奏效.使用 loaderInfo.url 我收到当前的 SWF 网址.

I'm trying to get current browser url. I have already tried with External Call, and it didn't work. And with loaderInfo.url I receive the current SWF url.

推荐答案

试试这个:

import flash.external.ExternalInterface;

var url:String = ExternalInterface.call("window.location.href.toString");
if (url) textfield.text = url;

应该可以解决问题.

这篇关于获取当前浏览器 URL - ActionScript 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆