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
target_mc:MovieClip
MovieClipLoader.loadClip()
httpStatus:Number
the server. For example, a status code of 404 indicates that the server has not found anything
matching the requested URI. For more information about HTTP status codes, see sections
10.4 and 10.5 of the HTTP specification at ftp://ftp.isi.edu/in-notes/rfc2616.txt.
Example
The following example creates a movie clip, a new
anonymous event listener which listens for the
event to interact with the loaded element properties.
onLoadInit
var loadListener:Object = new Object();
loadListener.onLoadComplete = function(target_mc:MovieClip,
httpStatus:Number):Void {
trace(">> loadListener.onLoadComplete()");
trace(">> =============================");
trace(">> target_mc._width: " + target_mc._width); // 0
trace(">> httpStatus: " + httpStatus);
}
loadListener.onLoadInit = function(target_mc:MovieClip):Void {
trace(">> loadListener.onLoadInit()");
trace(">> =============================");
trace(">> target_mc._width: " + target_mc._width); // 315
}
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(loadListener);
var mc:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mcLoader.loadClip("http://www.w3.org/Icons/w3c_main.png", 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.
[optional] - A movie clip loaded by the
method.
[optional] - (Flash Player 8 only) The HTTP status code returned by
MovieClip.getNextHighestDepth()
MovieClipLoader
event but waits for an
onLoadComplete
instance, and an
method, which is
MovieClipLoader
953
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?