MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 955

Actionscript 2.0 language reference
Table of Contents

Advertisement

Parameters
target_mc:MovieClip
method.
- A string that explains the reason for the failure, either
errorCode:String
or
"LoadNeverCompleted"
httpStatus:Number
the server. For example, a status code of 404 indicates that the server has not found anything
that matches 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 displays information in the Output panel when an image fails to load.
The URL used in this example is for demonstration purposes only; replace it with your own
valid URL.
var loadListener:Object = new Object();
loadListener.onLoadError = function(target_mc:MovieClip, errorCode:String,
httpStatus:Number) {
trace(">> loadListener.onLoadError()");
trace(">> ==========================");
trace(">> errorCode: " + errorCode);
trace(">> httpStatus: " + httpStatus);
}
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(loadListener);
var mc:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mcLoader.loadClip("http://www.fakedomain.com/images/bad_hair_day.jpg", 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
addListener (MovieClipLoader.addListener method)
(MovieClipLoader.loadClip method)
,
event listener)
onLoadComplete (MovieClipLoader.onLoadComplete event
listener)
- A movie clip loaded by the
.
[optional] - (Flash Player 8 only) The HTTP status code returned by
MovieClip.getNextHighestDepth()
,
onLoadStart (MovieClipLoader.onLoadStart
MovieClipLoader.loadClip()
,
loadClip
MovieClipLoader
"URLNotFound"
method, which is
955

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents