How to get/obtain Variables from URL in Flash AS3

前端 未结 2 1071
鱼传尺愫
鱼传尺愫 2020-12-30 13:17

So I have a URL that I need my Flash movie to extract variables from:

example link:
http://www.example.com/example_xml.php?aID=1234&bID=5678

I need t

2条回答
  •  一生所求
    2020-12-30 13:57

    Create a new instance of URLVariables.

    // given search: aID=1234&bID=5678
    var search:String = ExternalInterface.call("window.location.search");
    var vars:URLVariables = new URLVariables(search);
    trace(vars.aID); // 1234
    trace(vars.bID); // 5678
    

提交回复
热议问题