// 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
The keyword
this
component instance. For example, the following code, attached to the Loader instance
myLoaderComponent
on(complete){
trace(this);
}
handler and must be attached directly to a Loader instance.
on()
, used inside an
handler attached to a component, refers to the
on()
, sends "_level0.myLoaderComponent" to the Output panel:
Loader component
491
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers