User Guide

Basics for working with the core display classes 181
The following diagram shows the different uses of the LoaderInfo object—for the instance of
the main class of the SWF file, for a Loader object, and for an object loaded by the Loader
object:
The LoaderContext class
When you load an external file into Flash Player through the load() or loadBytes()
method of the Loader class, you can optionally specify a
context parameter. This parameter
is a LoaderContext object.
The LoaderContext class includes three properties that let you define the context of how the
loaded content can be used:
checkPolicyFile—Use this property only when loading an image file (not a SWF file).
If you set this property to
true, the Loader checks the origin server for a cross-domain
policy file (see Website controls (cross-domain policy files)” on page 456). This is
necessary only for content originating from domains other than that of the SWF file
containing the Loader object. If the server grants permission to the Loader domain,
ActionScript from SWF files in the Loader domain can access data in the loaded image; in
other words, you can use the
BitmapData.draw() command to access data in the loaded
image.
Note that a SWF file from other domains than that of the Loader object can call
Security.allowDomain() to permit a specific domain.
Stage
Instance of
the main class of
the SWF file
Loader object
LoaderInfo object
content
contentLoaderInfo
property
loaderInfo
property
LoaderInfo object
loaderInfo
property