Loader.scalecontent - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Example
The following code creates a Loader instance and then creates a listener object with an event
handler for the
progress
of the content has loaded:
//Create loader instance.
this.createClassObject(mx.controls.Loader, "my_ldr", 10);
//Create listener object.
var loaderListener:Object = new Object();
loaderListener.progress = function(evt_obj:Object){
// evt_obj.target is the component that generated the progress event,
// that is, the loader.
trace("image is " + my_ldr.percentLoaded + "% loaded.");
}
//Add Listener.
my_ldr.addEventListener("progress", loaderListener);
//Assign content path of loader.
my_ldr.contentPath = "http://www.flash-mx.com/images/image1.jpg";

Loader.scaleContent

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
loaderInstance.scaleContent
Description
Property; indicates whether the content scales to fit the loader (true), or the loader scales to fit
the content (
). The default value is
false
Example
The following code tells the loader to resize itself to match the size of its content:
my_ldr.scaleContent = false;
830
Loader component
event that sends a message to the Output panel telling what percent
.
true

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents