Name
loadMovie( ) Global Function — load an external .
swf file into the Player
Availability
Flash 4 and later. The loadMovie( ) function in
Flash 5 corresponds to the Flash 4 Load Movie
with a target path.
Synopsis
loadMovie(URL, target) loadMovie(URL, target, method)
Arguments
- URL
A string specifying the absolute or relative file path to the external
.swffile to load. All URLs must use forward slashes, and absolute URLs must include either thehttp://orfile|///protocol reference.
- target
A string indicating the movie clip or document level that will host the external
.swffile. May also be a reference to an existing movie clip or document level (references are converted to paths when used in a string context).
- method
An optional string indicating the method by which to send variables to an external script. The legal values for
methodare"GET"and"POST". This parameter must be a literal, not a variable or other expression. The standalone version of the Flash Player always uses the"GET"method regardless of themethodspecified.
Description
The loadMovie( ) function imports the
.swf file located at
URL into the Flash Player.
If target is a reference to an existing
movie clip or a string indicating the path to a movie clip, the
loaded .swf file is placed into the specified
clip (causing the eviction of any previous content). To load a movie
into the current movie clip, use the empty
string as the target parameter, as in:
loadMovie("myMovie.swf", "")If target is a reference to an existing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access