MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 951

Actionscript 2.0 language reference
Table of Contents

Advertisement

Availability: ActionScript 1.0; Flash Player 7 - Support for unanimated GIF files, PNG files,
and progressive JPEG files is available as of Flash Player 8.
Parameters
- The absolute or relative URL of the SWF, JPEG, GIF, or PNG file to be
url:String
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:///. Filenames cannot include disk drive
specifications.
- The target path of a movie clip, or an integer specifying the level in Flash
target:Object
Player into which the movie will be loaded. The target movie clip is replaced by the loaded
SWF file or image.
Returns
- A Boolean value. Returns
Boolean
.
false
Example
The following example shows how to use the
creating a handler for the
You should either place the following code directly into a frame action on a Timeline, or paste
it into a class that extends MovieClip. This code also expects an image named YourImage.jpg
to exist in the same directory as the compiled SWF file.
var container:MovieClip = createEmptyMovieClip("container",
getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip("YourImage.jpg", container);
function onLoadInit(mc:MovieClip) {
trace("onLoadInit: " + mc);
}
If your SWF file includes a version 2 component, use the version 2 component's
DepthManager class instead of the
used in this example.
See also
onLoadInit (MovieClipLoader.onLoadInit event listener)
if the URL request was sent successfully; otherwise
true
MovieClipLoader.loadClip()
event and then making the request.
onLoadInit
MovieClip.getNextHighestDepth()
method by
method, which is
MovieClipLoader
951

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents