952
ActionScript classes
MovieClipLoader constructor
public MovieClipLoader()
Creates a MovieClipLoader object that you can use to implement a number of listeners to
respond to events while a SWF, JPEG, GIF, or PNG file is downloading.
Availability:
ActionScript 1.0; Flash Player 7
Example
See
MovieClipLoader.loadClip()
.
See also
addListener (MovieClipLoader.addListener method)
,
loadClip
(MovieClipLoader.loadClip method)
onLoadComplete
(MovieClipLoader.onLoadComplete event listener)
onLoadComplete = function([target_mc:MovieClip], [httpStatus:Number]) {}
Invoked when a file that was loaded with
MovieClipLoader.loadClip()
is completely
downloaded. Call this listener on a listener object that you add using
MovieClipLoader.addListener()
. The
onLoadComplete
event listener is passed by Flash
Player to your code, but you do not have to implement all of the parameters in the listener
function. The value for
target_mc
identifies the movie clip for which this call is being made.
This identification is useful when multiple files are being loaded with the same set of listeners.
In Flash Player 8, this listener can return an HTTP status code. If Flash Player cannot get the
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.
It's important to understand the difference between
MovieClipLoader.onLoadComplete
and
MovieClipLoader.onLoadInit
. The
onLoadComplete
event is called after the SWF,
JPEG, GIF, or PNG file loads, but before the application is initialized. At this point, it is
impossible to access the loaded movie clip's methods and properties, and therefore you cannot
call a function, move to a specific frame, and so on. In most situations, it's better to use the
onLoadInit
event instead, which is called after the content is loaded and fully initialized.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...