SWiSH Player Support SWF4 or later - Supported Internally
Syntax spritename.loadMovie("url"[, variables])
Arguments spritename: Name of the Sprite / Movie Clip that is loaded.
url: The absolute or relative URL of the .swf file or .jpeg file to be loaded. A relative path must be relative to the .swf file at level 0. The URL must be in the same subdomain as the URL where the Movie currently resides. For use in the 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 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
Action and Sprite Method: Loads a .swf or .jpeg file into the Flash Player while the original Movie is playing. The loadMovie Action lets you display several Movies at once and switch between Movies without loading another HTML document.
Without the loadMovie Action, the Flash Player displays a single Movie (.swf file) and then closes. When you use the loadMovie Action, you must specify a target Sprite / Movie Clip, into which the Movie will load.
A Movie or image loaded into a target inherits the position, rotation, and scale properties of the targeted Sprite / Movie Clip. The upper-left corner of the loaded image or Movie aligns with the registration point of the targeted Movie Clip. Alternatively, if the target is the _root Timeline, the upper left corner of the image or Movie aligns with the upper-left corner of the stage.
Use the unloadMovie Action to remove Movies loaded with the loadMovie Action.
Note: An export setting of SWF6 version or higher is required to load a non-progressive JPEG image file.
Sample
The following loadMovie statement if added to the onLoad event of a Sprite, loads the external file into that Sprite when the Sprite is loaded.
onLoad () {
this.loadMovie("http://www.swishzone.com/script_samples/testswf.swf");
}
Note: The above script must be tested using the test in player or test in browser feature. loadVariables / loadMovies functions cannot be debugged using standard debugging features
See also loadMovie, loadMovieNum, unloadMovie, unloadMovieNum, loadVariables and loadVariablesNum.