Flash Script – Load a Movie in FlashBy Georgina Laidlaw
Note that in this tutorial, I’ll assume that you know how to create a button.
1. Create two buttons, one labelled "Load movie1", the other labelled "LoadMovie2".
2. Create a new blank movie clip — a clip with no objects in it.
3. Give this new blank movie clip an instance name of "dummy".
4. Right click the "load movie1" button, select "actions", and insert the following:
loadMovie ("mov1.swf", "/dummy");
This code loads the swf file called mov1.swf into target "/dummy". You can replace this reference with on to you own swf file, which should be located in the same directory.
5. Right click the "load movie2" button, select "actions", and insert this action:
loadMovie ("mov2.swf", "/dummy");
Press ctrl+enter to test the movie.
The load movie syntax is:
loadMovie(url [,location/target, variables]]);
url: the path of the file.
location: an optional argument that specifies the level into which the movie is loaded.
The loaded movie inherits the position, rotation, and scale properties of the targeted movie clip.
variables: an optional argument that specifies a method for sending variables associated with the movie to load.
The argument must be the string "GET" or "POST." Omit these if there are no arguments.