The root dependency for all AwayJS modules: contains basic data structures, loading mechanisms, event objects and utility functions useful for all types of rich media interface and interaction.
attributes
Data structures for interleaved or isolated binary data streams.
audio
Data structures for audio (to be moved to its own audio module).
errors
Error types.
events
Event objects for core classes.
geom
Geometric data structures.
image
Deprecated.
library
Asset loading and management APIs.
managers
Managers for audio (to be moved to own audio module).
net
URL Request APIs.
parsers
Base classes for parsers API, possibly merge with library.
projections
Projection APIs for general 2D / 3D projection.
ui
Helper classes for interface interaction.
utils
Binary data wrappers, helper classes for RAF and timers, Color and debug utils.
Add an event listener
Dispatch an event
check if an object has an event listener assigned to it
Remove an event listener
The bytes associated with a LoaderInfo object.
The number of bytes that are loaded for the media. When this number equals
the value of bytesTotal
, all of the bytes are loaded.
The number of compressed bytes in the entire media file.
Before the first progress
event is dispatched by this
LoaderInfo object's corresponding Loader object, bytesTotal
is 0. After the first progress
event from the Loader object,
bytesTotal
reflects the actual number of bytes to be
downloaded.
The loaded object associated with this LoaderInfo object.
The MIME type of the loaded file. The value is null
if not
enough of the file has loaded in order to determine the type. The
following list gives the possible values:
"application/x-shockwave-flash"
"image/jpeg"
"image/gif"
"image/png"
The Loader object associated with this LoaderInfo object. If this
LoaderInfo object is the loaderInfo
property of the instance
of the main export class of the SWF file, no Loader object is associated.
The URL of the media being loaded.
Before the first progress
event is dispatched by this
LoaderInfo object's corresponding Loader object, the value of the
url
property might reflect only the initial URL specified in
the call to the load()
method of the Loader object. After the
first progress
event, the url
property reflects
the media's final URL, after any redirects and relative URLs are
resolved.
In some cases, the value of the url
property is truncated;
see the isURLInaccessible
property for details.
Generated using TypeDoc
The LoaderInfo export class provides information about a loaded SWF file or 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:
contentLoaderInfo
property of a flash.display.Loader object - ThecontentLoaderInfo
property is always available for any Loader object. For a Loader object that has not called theload()
orloadBytes()
method, or that has not sufficiently loaded, attempting to access many of the properties of thecontentLoaderInfo
property throws an error.loaderInfo
property of a display object.The
contentLoaderInfo
property of a Loader object provides information about the content that the Loader object is loading, whereas theloaderInfo
property of a DisplayObject provides information about the root SWF file for that display object.When you use a Loader object to load a display object(such as a SWF file or a bitmap), the
loaderInfo
property of the display object is the same as thecontentLoaderInfo
property of the Loader object(DisplayObject.loaderInfo = Loader.contentLoaderInfo
). Because the instance of the main export class of the SWF file has no Loader object, theloaderInfo
property is the only way to access the LoaderInfo for the instance of the main export class of the SWF file.The following diagram shows the different uses of the LoaderInfo object - for the instance of the main export class of the SWF file, for the
contentLoaderInfo
property of a Loader object, and for theloaderInfo
property of a loaded object:When a loading operation is not complete, some properties of the
contentLoaderInfo
property of a Loader object are not available. You can obtain some properties, such asbytesLoaded
,bytesTotal
,url
,loaderURL
, andapplicationDomain
. When theloaderInfo
object dispatches theinit
event, you can access all properties of theloaderInfo
object and the loaded image or SWF file.Note: All properties of LoaderInfo objects are read-only.
The
EventDispatcher.dispatchEvent()
method is not applicable to LoaderInfo objects. If you calldispatchEvent()
on a LoaderInfo object, an IllegalOperationError exception is thrown.