The Initialize script in the Script movie clip is the script that gets called before anything else in the movie, normally in the first frame. In the ManiFestival movie, we use the Initialize script to load the Subway and Tunnel movies. To create the Initialize script, follow these steps:
When you're finished, your initializing code should look like this: Load Movie ("tunnel.swf", "/tunnel") Load Movie ("subway.swf", "/subway") Note load variables In the Load Movie dialog, you'll notice an option called Load Variables. I didn't need to use the Load Variables option for this example, but it's a powerful new function you should be aware of. With this, a set of variables is passed from the location listed in the URL field, which allows the server to dynamically update a Flash movie. Or, more specifically , it allows a Flash movie to update itself from the server-side script by calling it. When these options are used, the URL location is typically a CGI or other server-side script. It can also refer to an external text file. Variables returned from a server-side script or text file are listed in URL encoded strings. Consider the following: "myvariable=100&myvariable2=test&myvarialbe3=ok" By calling this server-side script or text file, the variables myvariable, myvariable2, and myvariable3 are now set to "100," "test," and "ok," respectively, in your movie. |