开发者

Get swf parameters in action script 2

How can I get swf parameters using actionscript2? like

myflash.swf?p=1
开发者_JAVA技巧

or

<param name="flashvars" value="p=1" />

Thanks.


If I remember correctly:

<param name="FlashVars" value="example=test"> under the other param tags, and flashvars="example=test" as extra attribute in the embed tag.

The variable will then be globally accessible in the movie.

trace(example) -> output: test


<embed src="myApplication.swf?name1=value1&name2=value2" />

var s:String = stage.loaderInfo.parameters["name2"];


Hey I have the answer to this. Create an intermediate webpage with the parameters you need and get the xml or html. You could write a file with an url and return the url with loadVars. But it needs sinchronization. There should be easier like url parameters or javascript.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜