I’ve been playing around a bit with saving information from flash to the server. I basically wanted to create a database without have to actually go through the hassle of creating a database.
I found that the easiest, but still fairly robust, option was to have Flash call a PHP page that would generate an XML file on the server. Flash now plays very nice with XML so it works great.
This is all still very new territory for me so I don’t think think I’m qualified to provide a tutorial of any kind but if anyone’s interested let me know and I’d be more than happy to share my files with you.
This weekend I also figured out how to pass a variable to an SWF that is embedded in an HTML page through the URL. If the Flash movie is not embedded you can just pass the variable like: http://www.mysite.com/myMovie.swf?var1=value
You just need a variable of the same name in Flash, in this case “var1″.
However… when the swf is embedded it’s a bit trickier. The HTML needs to pass the var to Flash, not the URL. So the way I’m doing it is by sending the var to a PHP page which plugs in the desired value in the HTML page.