The LoaderInfo object provides information about a loaded image file (JPEG, GIF, or PNG). LoaderInfo objects are available for any display object. The information provided includes load progress, the URLs of the loader and loaded content, the number of bytes total for the media, and the nominal height and width of the media.

You can access LoaderInfo objects in two ways:


The contentLoaderInfo property of a Loader object - The contentLoaderInfo property is always available for any Loader object. For a Loader object that has not called the load() or loadBytes() method, or that has not sufficiently loaded, attempting to access many of the properties of the contentLoaderInfo property throws an error.


The loaderInfo property of a display object. (not supported)

The contentLoaderInfo property of a Loader object provides information about the content that the Loader object is loading, whereas the loaderInfo property of a DisplayObject provides information about the root for that display object.


When you use a Loader object to load a display object (such as a bitmap), the loaderInfo property of the display object is the same as the contentLoaderInfo property of the Loader object (DisplayObject.loaderInfo = Loader.contentLoaderInfo). Because the instance of the main object of the file has no Loader object, the loaderInfo property is the only way to access the LoaderInfo for the instance of the main object of the file.


has properties:

bytes

The bytes associated with a LoaderInfo object.

read-only, ByteArray.

childAllowsParent

Expresses the trust relationship from content (child) to the Loader (parent).

read-only, true/false

content

The loaded object associated with this LoaderInfo object.

DisplayObject.

contentType

The MIME type of the loaded file.

string

frameRate

The nominal frame rate, in frames per second, of the loaded file. (not supported)

read-only, float

height

The nominal height of the loaded file.

read-only, int

loader

The Loader object associated with this LoaderInfo object.

read-only, Loader.

loaderURL

The URL of the file that initiated the loading of the media described by this LoaderInfo object.

read-only, string

parameters

An object that contains name-value pairs that represent the parameters provided to the loaded file.

read-only

parentAllowsChild

Expresses the trust relationship from Loader (parent) to the content (child).

read-only, true/false

sameDomain

Expresses the domain relationship between the loader and the content: true if they have the same origin domain; false otherwise.

read-only, true/false

sharedEvents

An EventDispatcher instance that can be used to exchange events across security boundaries.

read-only, EventDispatcher.

url

The URL of the media being loaded.

read-only, string

width

The nominal width of the loaded content.

read-only, int


method:

load(request)

Loads a JPEG, progressive JPEG, unanimated GIF, or PNG file

request - URLRequest object with absolute or relative URL of the JPEG, GIF, or PNG file to be loaded. A relative path must be relative to the main app file. Absolute URLs must include the protocol reference, such as http:// or file:///. Filenames cannot include disk drive specifications.


events:

Lib.Media.Events.Event.COMPLETE

Lib.Media.Events.Event.OPEN

Lib.Media.Events.ProgressEvent.PROGRESS

Lib.Media.Events.IOErrorEvent.IO_ERROR

Lib.Media.Events.HTTPStatusEvent.HTTP_STATUS

Created with the Personal Edition of HelpNDoc: Easy EPub and documentation editor