从Flex 3的获取当前页面的网址是什么?页面、网址、Flex

2023-09-08 12:35:59 作者:煮酒撒江上

我如何从Flex内确定当前页面的网址是什么?

How do I determine the URL of the current page from within Flex?

推荐答案

使用ExternalInterface的(的flash.external.ExternalInterface ),你可以在浏览器中执行JavaScript。 知道了这一点,你可以叫

Using ExternalInterface (flash.external.ExternalInterface), you can execute Javascript in the browser. Knowing this, you can call

ExternalInterface.call(window.location.href.toString);

获取当前URL(注意,这将是网页的网址,而不是瑞士法郎URL)。

to get the current URL (note that this will be the page url and not the .swf url).

心连心

公园