Loading and unloading additional SWF files

To play additional SWF files without closing Flash Player, or to switch SWF files without loading another HTML page, you can use the global loadMovie() function or loadMovie() method of the MovieClip class. You can also use loadMovie() to send variables to a CGI script, which generates a SWF file as its CGI output. When you load a SWF file, you can specify a level or movie clip target into which the SWF file will load. If you load a SWF file into a target, the loaded SWF file inherits the properties of the targeted movie clip. Once the movie is loaded, you can change those properties.

The unloadMovie() method removes a SWF file previously loaded by loadMovie(). Explicitly unloading SWF files with unloadMovie() ensures a smooth transition between SWF files and may decrease the memory required by Flash Player.

Use loadMovie() to do any of the following:

For more information on loading movies, see Loading external SWF and JPEG files.