There are a number of methods you can use to synchronize your flash movie to a back-end, including Flash Remoting, XML and send/load vars. Here’s some example code (from the O’Reilly “Flash Cookbook” - buy it!) for loading vars from a server-side cgi script.
// You must first create the LoadVars object.
myLoadVars = new LoadVars( );
// Then load the variable from the server-side script. This example
// uses the loadVarsScript.cgi script, which is assumed to be in
// the /cgi-bin directory on the same server. To test this code,
// change the URL to point to an actual script on your server.
myLoadVars.load("/cgi-bin/loadVarsScript.cgi");
myLoadVars.onLoad = function (success) {
// If the data loads, display the variable in a
// text field named output_txt on _root.
if (success) {
_root.output_txt.text = this.myVar;
}
};
Instead of CGI, those vars could be loaded from an ASP page as well…