User Guide

Loader component 491
// eventObj.target is the component that generated the progress event,
// that is, the loader
pBar.setProgress(loader.bytesLoaded, loader.bytesTotal); // show progress
}
loader.addEventListener("progress", loadListener);
loader.content = "logo.swf";
See also
Loader.bytesLoaded
Loader.complete
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
Usage 1:
on(complete){
...
}
Usage 2:
listenerObject = new Object();
listenerObject.complete = function(eventObject){
...
}
loaderInstance.addEventListener("complete", listenerObject)
Description
Event; broadcast to all registered listeners when the content has finished loading.
The first usage example uses an
on() handler and must be attached directly to a Loader instance.
The keyword
this, used inside an on() handler attached to a component, refers to the
component instance. For example, the following code, attached to the Loader instance
myLoaderComponent, sends “_level0.myLoaderComponent” to the Output panel:
on(complete){
trace(this);
}