Get URL of current page from Flex 3?

前端 未结 7 793
死守一世寂寞
死守一世寂寞 2021-01-12 17:58

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

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-12 18:17

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

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

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

    hth

    Koen

提交回复
热议问题