MovieClip
485
Parameters
url
:
String
- The absolute or relative URL of the SWF or JPEG file to be loaded. A relative
path must be relative to the SWF file at level 0. Absolute URLs must include the protocol
reference, such as
http://
or
file:///
.
method
:
String
[optional] - Specifies an HTTP method for sending or loading variables. The
parameter must be the string
GET
or
POST
. If no variables are 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.
Example
The following example creates a new movie clip, then creates child inside of it and loads a
PNG image into the child. This allows the parent to retain any instance values that were
assigned prior to the call to
loadMovie
.
var mc:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mc.onRelease = function():Void {
trace(this.image._url); // http://www.w3.org/Icons/w3c_main.png
}
var image:MovieClip = mc.createEmptyMovieClip("image",
mc.getNextHighestDepth());
image.loadMovie("http://www.w3.org/Icons/w3c_main.png");
See also
_lockroot (MovieClip._lockroot property)
,
unloadMovie (MovieClip.unloadMovie
method)
,
loadVariables (MovieClip.loadVariables method)
,
loadMovie
(MovieClip.loadMovie method)
,
onPress (MovieClip.onPress handler)
,
MovieClipLoader
,
onClipEvent handler
,
on handler
,
loadMovieNum function
,
unloadMovie function
,
unloadMovieNum function
loadVariables (MovieClip.loadVariables method)
public loadVariables(url:
String
, [method:
String
]) : Void
Reads data from an external file and sets the values for variables in the movie clip. The
external file can be a text file that ColdFusion generates, a CGI script, an Active Server Page
(ASP), a PHP script, or any other properly formatted text file. The file can contain any
number of variables.
Summary of Contents for Flash Lite 2
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...