M > MovieClip.loadMovie

 

MovieClip.loadMovie

Availability

Flash Player 5.

Usage

myMovieClip.loadMovie("url" [,variables])

Parameters

url An absolute or relative URL of the SWF or JPEG file to be loaded. A relative path must be relative to the SWF file at _level0. The URL must be in the same subdomain as the URL where the movie currently resides. For use in the stand-alone Flash Player or for testing in test mode in the Flash authoring application, all SWF files must be stored in the same folder, and the filenames cannot include folder or disk drive specifications.

variables An optional parameter specifying an HTTP method for sending or loading variables. The parameter must be the string GET or POST. If there are no variables to be sent, omit this parameter. The GET method appends the variables to the end of the URL, and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for long strings of variables.

Returns

Nothing.

Description

Method; loads SWF or JPEG files into a movie clip in the Flash Player while the original movie is playing. Without the loadMovie method, the Flash Player displays a single movie (SWF file) and then closes. The loadMovie method lets you display several movies at once and switch between movies without loading another HTML document.

A movie or image loaded into a movie clip inherits the position, rotation, and scale properties of the movie clip. You can use the target path of the movie clip to target the loaded movie.

Use the unloadMovie method to remove movies or images loaded with the loadMovie method. Use the loadVariables method to keep the active movie, and update the variables with new values.

See also

loadMovie, loadMovieNum, MovieClip.loadVariables, MovieClip.unloadMovie, unloadMovie, unloadMovieNum