Moviecliploader.onloadcomplete - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

MovieClipLoader.onLoadComplete

Availability
Flash Player 7.
Usage
listenerObject.onLoadComplete = function([target_mc:Object]) {
// your statements here
}
Parameters
listenerObject
A movie clip loaded by a
target_mc
optional.
Returns
Nothing.
Description
Listener; invoked when a file loaded with
downloaded. The value for
This is useful if multiple files are being loaded with the same set of listeners.
This parameter is passed by Flash to your code, but you do not have to implement all of the
parameters in the listener function.
When you use the
important to understand how this differs from the way they work with your SWF file. The
onLoadComplete
has been initialized. At this point it is impossible to access the loaded movie clip's methods and
properties, and because of this you cannot call a function, move to a specific frame, and so on. In
most situations, it's better to use the
has loaded and is fully initialized.
Example
The following example loads an image into a movie clip instance called
and
onLoadInit
image. The information displays in a dynamically created text field called
this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadStart = function(target_mc:MovieClip) {
target_mc.startTimer = getTimer();
};
mclListener.onLoadComplete = function(target_mc:MovieClip) {
target_mc.completeTimer = getTimer();
};
mclListener.onLoadInit = function(target_mc:MovieClip) {
var timerMS:Number = target_mc.completeTimer-target_mc.startTimer;
A listener object that was added using MovieClipLoader.addListener().
MovieClipLoader.loadClip()
target_mc
and
onLoadComplete
event is called after the SWF or JPEG file has loaded, but before the application
onLoadInit
events are used to determine how long it takes to load the
onLoadComplete
MovieClipLoader.loadClip()
identifies the movie clip for which this call is being made.
events with the MovieClipLoader class, it's
onLoadInit
event instead, which is called after the content
MovieClipLoader.onLoadComplete
method. This parameter is
has completely
. The
image_mc
.
timer_txt
607

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents