Working with Movie Clips > Using actions and methods to control Timelines > Loading and unloading additional movies
Loading and unloading additional movies
You can use the loadMovie
action or method to play additional movies without closing the Flash Player, or to switch movies without loading another HTML page. 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 movie, you can specify a level or movie clip target into which the movie will load.
The unloadMovie
action and method removes a movie previously loaded by loadMovie
. Explicitly unloading movies with unloadMovie
ensures a smooth transition between movies and can lighten the memory required by the Flash Player. Use the loadMovie
action to do any of the following:
![]() |
Play a sequence of banner ads that are SWF files by placing a loadMovie action at the end of each SWF file to load the next movie |
![]() |
Develope a branching interface that lets the user choose among several different SWF files |
![]() |
Build a navigation interface with navigation controls in level 0 that load other levels. Loading levels produces smoother transitions than loading new HTML pages in a browser. |