User Guide
954 ActionScript classes
See also
addListener (MovieClipLoader.addListener method), loadClip
(MovieClipLoader.loadClip method)
, onLoadStart (MovieClipLoader.onLoadStart
event listener)
, onLoadError (MovieClipLoader.onLoadError event listener),
onLoadInit (MovieClipLoader.onLoadInit event listener)
onLoadError (MovieClipLoader.onLoadError event
listener)
onLoadError = function(target_mc:MovieClip, errorCode:String,
[httpStatus:Number]) {}
Invoked when a file loaded with MovieClipLoader.loadClip() has failed to load. This
listener can be invoked for various reasons; for example, if the server is down, the file is not
found, or a security violation occurs.
Call this listener on a listener object that you add by using
MovieClipLoader.addListener().
The value of
target_mc identifies the movie clip for which this call is being made. This
parameter is useful if you are loading multiple files with the same set of listeners.
For the
errorCode parameter, the string "URLNotFound" is returned if neither the
MovieClipLoader.onLoadStart or MovieClipLoader.onLoadComplete listener has been
called; for example, if a server is down or the file is not found. The string
"LoadNeverCompleted" is returned if MovieClipLoader.onLoadStart was called but
MovieClipLoader.onLoadComplete was not called; for example, if the download was
interrupted because of server overload, server crash, and so on.
In Flash Player 8, this listener can return an HTTP status code in the
httpStatus parameter.
If Flash Player cannot get a status code from the server, or if Flash Player cannot communicate
with the server, the default value of 0 is passed to your ActionScript code. A value of 0 can be
generated in any player (for example, if a malformed URL is requested), and a value of 0 is
always generated by the Flash Player plug-in when run in the following browsers, which
cannot pass HTTP status codes from the server to Flash Player: Netscape, Mozilla, Safari,
Opera, and Internet Explorer for the Macintosh. A value of 0 can also be generated if the
player did not try to make the URL request to perform the load operation. This can happen
because the request violates security sandbox rules for the SWF file.
Availability: ActionScript 1.0; Flash Player 7