在 AS3 条件中使用当前浏览器 URL

using the current browser URL in AS3 conditionals

我是 ActionScript 的新手,我想知道是否有办法使用页面 URL 我嵌入的 SWF 来使用一些 if 条件。我的 SWF 是一个交互式菜单,将位于不同的页面中,它需要根据用户所在的页面执行特定操作。

我在想一些条件,比如:

    if (URL ="https://example.com/1"){
  gotoAndStop(2)
  }
  else if (URL ="https://example.com/2"){
  gotoAndStop(3)
  }
  else if (URL ="https://example.com/3"){
  gotoAndStop(4)
  }

有没有办法存档这样的东西?

使用外部接口:

if (ExternalInterface.available)
{
    var url:String = ExternalInterface.call("window.location.href.toString");
    if (url == "https://...
}