Onloadstart (Moviecliploader.onloadstart Event Listener) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

totalBytes:Number
Example
The following example creates a movie clip, a new
anonymous event listener. It periodically outputs the progress of a load and finally provides
notification when the load is complete and the asset is available to ActionScript.
var container:MovieClip = this.createEmptyMovieClip("container",
this.getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number,
bytesTotal:Number):Void {
trace(target + ".onLoadProgress with " + bytesLoaded + " bytes of " +
bytesTotal);
}
listener.onLoadInit = function(target:MovieClip):Void {
trace(target + ".onLoadInit");
}
mcLoader.addListener(listener);
mcLoader.loadClip("http://www.w3.org/Icons/w3c_main.png", container);
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)
method)
onLoadStart (MovieClipLoader.onLoadStart event
listener)
onLoadStart = function([target_mc:MovieClip]) {}
Invoked when a call to
this listener on a listener object that you add by using
The value for
target_mc
parameter is useful if you are loading multiple files with the same set of listeners.
Availability: ActionScript 1.0; Flash Player 7
958
ActionScript classes
- The total number of bytes in the file being loaded.
MovieClip.getNextHighestDepth()
,
getProgress (MovieClipLoader.getProgress
MovieClipLoader.loadClip()
identifies the movie clip for which this call is being made. This
instance, and an
MovieClipLoader
,
loadClip
has begun to download a file. Call
MovieClipLoader.addListener()
method, which is
.

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?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF