User Guide
813
28
CHAPTER 28
Loader component
The Loader component is a container that can display a SWF or JPEG file (but not progressive
JPEG files). You can scale the contents of the loader or resize the loader itself to accommodate
the size of the contents. By default, the contents are scaled to fit the loader. You can also load
content at runtime and monitor loading progress (although after content has been loaded
once it is cached, so the progress jumps to 100% quickly).
A Loader component can’t receive focus. However, content loaded into the Loader
component can accept focus and have its own focus interactions. For more information about
controlling focus, see “FocusManager class” on page 721 or “Creating custom focus
navigation” in Using Components.
A live preview of each Loader instance reflects changes made to parameters in the Property
inspector or Component inspector during authoring.
You can use the Accessibility panel to make Loader component content accessible to screen
readers. For more information, see Chapter 19, “Creating Accessible Content,” in Using Flash.
Using the Loader component
You can use a loader whenever you need to retrieve content from a remote location and pull it
into a Flash application. For example, you could use a loader to add a company logo (JPEG
file) to a form. You could also use a loader to leverage Flash work that has already been
completed. For example, if you had already built a Flash application and wanted to expand it,
you could use the loader to pull the old application into a new application, perhaps as a
section of a tab interface. In another example, you could use the loader component in an
application that displays photos. Use
Loader.load(), Loader.percentLoaded, and
Loader.complete to control the timing of the image loads and display progress bars to the
user during loading.