Tutorial: Passing data to Flash with URL query strings
Tuesday, August 17th, 2010Like ASP and PHP, Flash can access query strings supplied in the URL. This tutorial discusses how to pass data to a Flash movie (.swf) via the URL reference.
For Example:
http://www.mysite.com/mymovie.swf?var1=test1&var2=0
…will pass the values test1 and 0 to the variables var1 and var2. Note that the first variable is separated from the movie name via a ? character and each subsequent variable is then separated by the & character.
The sample link below allows you to experiment.
http://demos.swishspace.com/var1var2.swf?var1=test1&var2=0
Try reloading the page with different values for var1 and var2 by manually editing the browser reference. The reloaded page should show the revised values.
Read on to find out more about these variables, their advantages and some of the limitations.





