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.
精彩评论