MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 819

Components language reference
Table of Contents

Advertisement

The Loader can load content from other domains, if you have policy files in those domains.
See "Allowing cross-domain data loading" in Learning ActionScript 2.0 in Flash.
scaleContent
indicates whether the content scales to fit the loader (
to fit the content (
false
You can set the following additional parameters for each Loader component instance in the
Component inspector (Window > Component Inspector):
enabled
is a Boolean value that indicates whether the component can receive focus and input.
The default value is
true
visible
is a Boolean value that indicates whether the object is visible (
The default value is
true
The minHeight and minWidth properties are used by internal sizing routines. They are
defined in UIObject and are overridden by different components as needed. These
properties can be used if you make a custom layout manager for your application.
Otherwise, setting these properties in the Component inspector has no visible effect.
You can write ActionScript to set additional options for Loader instances using its methods,
properties, and events. For more information, see
Creating an application with the Loader component
The following procedure explains how to add a Loader component to an application while
authoring. In this example, the loader loads a logo JPEG from an imaginary URL.
To create an application with the Loader component:
1.
Drag a Loader component from the Components panel to the Stage.
2.
In the Property inspector, enter the instance name flower.
3.
Select the loader on the Stage and in the Component inspector, and enter http://
www.flash-mx.com/images/image1.jpg for the contentPath parameter.
To create a Loader component instance using ActionScript:
1.
Drag the Loader component from the Components panel to the library.
2.
Select the first frame in the main Timeline, open the Actions panel, and enter the
following code:
this.createClassObject(mx.controls.Loader, "my_loader", 1);
my_loader.contentPath = "http://www.flash-mx.com/images/image1.jpg";
This script uses the method
Loader instance.
3.
Select Control > Test Movie.
). The default value is
.
.
"UIObject.createClassObject()" on page 1362
true
.
true
"Loader class" on page
Using the Loader component
), or the loader scales
) or not (
).
true
false
817.
to create the
815

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

This manual is also suitable for:

Flash 8

Table of Contents