开发者

AS3 - How do you receive parameters in a swf from a GET request?

开发者 https://www.devze.com 2023-01-15 23:53 出处:网络
I tried using var params: Object = ((this.stage.loaderInfo) as LoaderInfo).parameters; to get the parameters, but it returns an Object with no properties. That LoaderInfo will give me the correct URL

I tried using var params: Object = ((this.stage.loaderInfo) as LoaderInfo).parameters; to get the parameters, but it returns an Object with no properties. That LoaderInfo will give me the correct URL without the parameters though if I use LoaderInfo.url. I'm using the request: http://localhost/foo.swf?start=foobar. params.hasOwnProp开发者_JAVA百科erty("start") returns nothing, and using a for loop shows that "params" has no properties. How do I receive the start/foobar pair in my code? I would much prefer to not use FlashVars due to our setup.


Usually you must embed the SWF into an HTML document, then access the url string as you describe.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号