Packageimpression.resolver
Classpublic class LoaderInfoEx
InheritanceLoaderInfoEx Inheritance flash.events.EventDispatcher

The LoaderInfoEx class wraps the LoaderInfo object, providing additional events and state information.

Note that LoaderInfoEx does not extend the LoaderInfo object; rather, it keeps an internal reference to the LoaderInfo. A LoaderInfoEx object should never be created using the new constructor, it should only be accessed from the contentLoaderInfoEx property of a LoaderEx object.

See also

flash.display.LoaderInfo


Public Properties
 PropertyDefined By
  actionScriptVersion : uint
[read-only] The ActionScript version of the loaded SWF file.
LoaderInfoEx
  active : Boolean
[read-only] true if the object is currently loading data.
LoaderInfoEx
  applicationDomain : ApplicationDomain
[read-only] When an external SWF file is loaded, all ActionScript 3.0 definitions contained in the loaded class are stored in the applicationDomain property.
LoaderInfoEx
  bytes : ByteArray
[read-only] The bytes associated with a LoaderInfo object.
LoaderInfoEx
  bytesLoaded : uint
[read-only] The number of bytes that are loaded for the media.
LoaderInfoEx
  bytesTotal : uint
[read-only] The number of compressed bytes in the entire media file.
LoaderInfoEx
  childAllowsParent : Boolean
[read-only] Expresses the trust relationship from content (child) to the LoaderEx (parent).
LoaderInfoEx
  content : DisplayObject
[read-only] The loaded object associated with this LoaderInfoEx object.
LoaderInfoEx
  contentType : String
[read-only] The MIME type of the loaded file.
LoaderInfoEx
  frameRate : Number
[read-only] The nominal frame rate, in frames per second, of the loaded SWF file.
LoaderInfoEx
  height : int
[read-only] The nominal height of the loaded file.
LoaderInfoEx
  kbps : Number
[read-only] The bitrate at which the object is loading data.
LoaderInfoEx
  lastEvent : Event
[read-only] Returns a copy of the most recent event object dispatched.
LoaderInfoEx
  latency : Number
[read-only] The number of milliseconds between the time that the load request was issued and loading begins.
LoaderInfoEx
  loader : LoaderEx
[read-only] The LoaderEx object associated with this LoaderInfoEx object.
LoaderInfoEx
  loaderURL : String
[read-only] The URL of the SWF file that initiated the loading of the media described by this LoaderInfo object.
LoaderInfoEx
  parameters : Object
[read-only] An object that contains name-value pairs that represent the parameters provided to the loaded SWF file.
LoaderInfoEx
  parentAllowsChild : Boolean
[read-only] Expresses the trust relationship from Loader (parent) to the content (child).
LoaderInfoEx
  sameDomain : Boolean
[read-only] Expresses the domain relationship between the loader and the content: true if they have the same origin domain; false otherwise.
LoaderInfoEx
  sharedEvents : EventDispatcher
[read-only] An EventDispatcher instance that can be used to exchange events across security boundaries.
LoaderInfoEx
  swfVersion : uint
[read-only] The file format version of the loaded SWF file.
LoaderInfoEx
  url : String
[read-only] The URL of the media being loaded.
LoaderInfoEx
  width : int
[read-only] The nominal width of the loaded content.
LoaderInfoEx
Public Methods
 MethodDefined By
  
loaderInfo():LoaderInfo
Returns the object's internal loaderInfo object.
LoaderInfoEx
Events
 Event Summary Defined By
  Dispatched when the object receives a request to begin loading data.LoaderInfoEx
  Dispatched when a load operation in progress is cancelled.LoaderInfoEx
  Dispatched when data has loaded successfully.LoaderInfoEx
  Dispatched when the object has finished loading data.LoaderInfoEx
  Dispatched when a network request is made over HTTP and an HTTP status code can be detected.LoaderInfoEx
  Dispatched when the properties and methods of a loaded SWF file are accessible and ready for use.LoaderInfoEx
  Dispatched when an input or output error occurs that causes a load operation to fail.LoaderInfoEx
  Dispatched when a load operation starts.LoaderInfoEx
  Dispatched when data is received as the download operation progresses.LoaderInfoEx
  Dispatched by a LoaderInfoEx object whenever a loaded object is removed by using the unload() method of the LoaderEx object, or when a second load is performed by the same LoaderEx object and the original content is removed prior to the load beginning.LoaderInfoEx
Property Detail
actionScriptVersionproperty
actionScriptVersion:uint  [read-only]

The ActionScript version of the loaded SWF file. The language version is specified by using the enumerations in the ActionScriptVersion class, such as ActionScriptVersion.ACTIONSCRIPT2 and ActionScriptVersion.ACTIONSCRIPT3.


Implementation
    public function get actionScriptVersion():uint

See also

flash.display.LoaderInfo.actionScriptVersion
flash.display.ActionScriptVersion
activeproperty 
active:Boolean  [read-only]

true if the object is currently loading data.


Implementation
    public function get active():Boolean
applicationDomainproperty 
applicationDomain:ApplicationDomain  [read-only]

When an external SWF file is loaded, all ActionScript 3.0 definitions contained in the loaded class are stored in the applicationDomain property.


Implementation
    public function get applicationDomain():ApplicationDomain

See also

flash.display.LoaderInfo.applicationDomain
bytesproperty 
bytes:ByteArray  [read-only]

The bytes associated with a LoaderInfo object.


Implementation
    public function get bytes():ByteArray

See also

flash.display.LoaderInfo.bytes
bytesLoadedproperty 
bytesLoaded:uint  [read-only]

The number of bytes that are loaded for the media. When this number equals the value of bytesTotal, all of the bytes are loaded.


Implementation
    public function get bytesLoaded():uint

See also

flash.display.LoaderInfo.bytesLoaded
bytesTotalproperty 
bytesTotal:uint  [read-only]

The number of compressed bytes in the entire media file.

Before the first progress event is dispatched by this object's corresponding LoaderEx object, bytesTotal is 0. After the first progress event from the LoaderEx object, bytesTotal reflects the actual number of bytes to be downloaded.


Implementation
    public function get bytesTotal():uint

See also

flash.display.LoaderInfo.bytesTotal
childAllowsParentproperty 
childAllowsParent:Boolean  [read-only]

Expresses the trust relationship from content (child) to the LoaderEx (parent). If the child has allowed the parent access, true; otherwise, false. This property is set to true if the child object has called the allowDomain() method to grant permission to the parent domain or if a URL policy is loaded at the child domain that grants permission to the parent domain. If child and parent are in the same domain, this property is set to true.


Implementation
    public function get childAllowsParent():Boolean

See also

flash.display.LoaderInfo.childAllowsParent
contentproperty 
content:DisplayObject  [read-only]

The loaded object associated with this LoaderInfoEx object.


Implementation
    public function get content():DisplayObject

See also

flash.display.LoaderInfo.content
contentTypeproperty 
contentType:String  [read-only]

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:


Implementation
    public function get contentType():String

See also

flash.display.LoaderInfo.contentType
frameRateproperty 
frameRate:Number  [read-only]

The nominal frame rate, in frames per second, of the loaded SWF file. This number is often an integer, but need not be.

This value may differ from the actual frame rate in use. Flash Player or Adobe AIR only uses a single frame rate for all loaded SWF files at any one time, and this frame rate is determined by the nominal frame rate of the main SWF file. Also, the main frame rate may not be able to be achieved, depending on hardware, sound synchronization, and other factors.


Implementation
    public function get frameRate():Number

See also

flash.display.LoaderInfo.frameRate
heightproperty 
height:int  [read-only]

The nominal height of the loaded file. This value might differ from the actual height at which the content is displayed, since the loaded content or its parent display objects might be scaled.


Implementation
    public function get height():int

See also

flash.display.LoaderInfo.height
kbpsproperty 
kbps:Number  [read-only]

The bitrate at which the object is loading data.

This value is calculated by dividing bytesLoaded by elapsedTime and adjusting by a fixed factor to account for TCP/IP overhead.


Implementation
    public function get kbps():Number
lastEventproperty 
lastEvent:Event  [read-only]

Returns a copy of the most recent event object dispatched.

Note that the last event does not include the ResolverEvent.BEGIN or ResolverEvent.END events. The lastEvent object is not reset when the load method is invoked.


Implementation
    public function get lastEvent():Event
latencyproperty 
latency:Number  [read-only]

The number of milliseconds between the time that the load request was issued and loading begins.


Implementation
    public function get latency():Number
loaderproperty 
loader:LoaderEx  [read-only]

The LoaderEx object associated with this LoaderInfoEx object.


Implementation
    public function get loader():LoaderEx

See also

flash.display.LoaderInfo.loader
loaderURLproperty 
loaderURL:String  [read-only]

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


Implementation
    public function get loaderURL():String

See also

flash.display.LoaderInfo.loaderURL
parametersproperty 
parameters:Object  [read-only]

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

You can use a for-in loop to extract all the names and values from the parameters object.

The two sources of parameters are: the query string in the URL of the main SWF file, and the value of the FlashVars HTML parameter (this affects only the main SWF file).

The parameters property replaces the ActionScript 1.0 and 2.0 technique of providing SWF file parameters as properties of the main timeline.

The value of the parameters property is null for Loader objects that contain SWF files that use ActionScript 1.0 or 2.0. It is only non-null for Loader objects that contain SWF files that use ActionScript 3.0.


Implementation
    public function get parameters():Object

See also

flash.display.LoaderInfo.parameters
parentAllowsChildproperty 
parentAllowsChild:Boolean  [read-only]

Expresses the trust relationship from Loader (parent) to the content (child). If the parent has allowed the child access, true; otherwise, false. This property is set to true if the parent object called the allowDomain() method to grant permission to the child domain or if a URL policy file is loaded at the parent domain granting permission to the child domain. If child and parent are in the same domain, this property is set to true.


Implementation
    public function get parentAllowsChild():Boolean

See also

flash.display.LoaderInfo.parentAllowsChild
sameDomainproperty 
sameDomain:Boolean  [read-only]

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


Implementation
    public function get sameDomain():Boolean

See also

flash.display.LoaderInfo.sameDomain
sharedEventsproperty 
sharedEvents:EventDispatcher  [read-only]

An EventDispatcher instance that can be used to exchange events across security boundaries. Even when the LoaderEx object and the loaded content originate from security domains that do not trust one another, both can access sharedEvents and send and receive events via this object.


Implementation
    public function get sharedEvents():EventDispatcher

See also

flash.display.LoaderInfo.sharedEvents
swfVersionproperty 
swfVersion:uint  [read-only]

The file format version of the loaded SWF file. The file format is specified using the enumerations in the SWFVersion class, such as SWFVersion.FLASH7 and SWFVersion.FLASH9.


Implementation
    public function get swfVersion():uint

See also

flash.display.LoaderInfo.swfVersion
flash.display.SWFVersion
urlproperty 
url:String  [read-only]

The URL of the media being loaded.

Before the first progress event is dispatched by this LoaderInfoEx object's corresponding LoaderEx object, the value of the url property might reflect only the initial URL specified in the call to the load() method of the LoaderEx object. After the first progress event, the url property reflects the media's final URL, after any redirects and relative URLs are resolved.


Implementation
    public function get url():String

See also

flash.display.LoaderInfo.url
widthproperty 
width:int  [read-only]

The nominal width of the loaded content. This value might differ from the actual width at which the content is displayed, since the loaded content or its parent display objects might be scaled.


Implementation
    public function get width():int

See also

flash.display.LoaderInfo.width
Method Detail
loaderInfo()method
public function loaderInfo():LoaderInfo

Returns the object's internal loaderInfo object.

Returns
LoaderInfo
Event Detail
begin Event
Event Object Type: impression.events.ResolverEvent
ResolverEvent.type property = impression.events.ResolverEvent.BEGIN

Dispatched when the object receives a request to begin loading data.

This event is dispatched when the load method is invoked, either explicitly or implicitly as the result of calling the loadAsset method. This event will occur even if the request is null or cannot be loaded. This event will not occur if the active property value is true.

The ResolverEvent.BEGIN constant defines the value of the type property of a begin event object. This event has the following properties:
PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe object that raised the event.
relatedObjectThe object associated with the event. If target is a LoaderEx, SoundEx, or URLLoaderEx object, relatedObject is the instance of the URLRequest object to load. If target is a LoaderInfo object, relatedObject is the content object that originally dispatched the ResolverEvent.BEGIN event.

See also

close Event  
Event Object Type: flash.events.Event
Event.type property = flash.events.Event.CLOSE

Dispatched when a load operation in progress is cancelled.

This event is dispatched when the object is actively loading and the the close method is invoked.

See also

complete Event  
Event Object Type: flash.events.Event
Event.type property = flash.events.Event.COMPLETE

Dispatched when data has loaded successfully. In other words, it is dispatched when all the content has been downloaded and the loading has finished. The complete event is always dispatched after the init event. The init event is dispatched when the object is ready to access, though the content may still be downloading.

end Event  
Event Object Type: impression.events.ResolverEvent
ResolverEvent.type property = impression.events.ResolverEvent.END

Dispatched when the object has finished loading data.

This event is dispatched when the object is no longer actively loading data. This may be due to normal load completion, when an error occurs, or by invoking the close method.

The ResolverEvent.END constant defines the value of the type property of an end event object. This event has the following properties:
PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe object that raised the event.
relatedObjectThe object associated with the event. If target is a LoaderEx, SoundEx, or URLLoaderEx object, relatedObject is the instance of the URLRequest object to load. If target is a LoaderInfo object, relatedObject is the content object that originally dispatched the ResolverEvent.BEGIN event.

See also

httpStatus Event  
Event Object Type: flash.events.HTTPStatusEvent
HTTPStatusEvent.type property = flash.events.HTTPStatusEvent.HTTP_STATUS

Dispatched when a network request is made over HTTP and an HTTP status code can be detected.

init Event  
Event Object Type: flash.events.Event
Event.type property = flash.events.Event.INIT

Dispatched when the properties and methods of a loaded SWF file are accessible and ready for use. The content, however, can still be downloading. A LoaderInfoEx object dispatches the init event when the following conditions exist:

For example, an Event.INIT is dispatched when the first frame of a movie or animation is loaded. The movie is then accessible and can be added to the display list. The complete movie, however, can take longer to download. The Event.COMPLETE is only dispatched once the full movie is loaded.

The init event always precedes the complete event.

ioError Event  
Event Object Type: flash.events.IOErrorEvent
IOErrorEvent.type property = flash.events.IOErrorEvent.IO_ERROR

Dispatched when an input or output error occurs that causes a load operation to fail.

open Event  
Event Object Type: flash.events.Event
Event.type property = flash.events.Event.OPEN

Dispatched when a load operation starts.

progress Event  
Event Object Type: flash.events.ProgressEvent
ProgressEvent.type property = flash.events.ProgressEvent.PROGRESS

Dispatched when data is received as the download operation progresses.

unload Event  
Event Object Type: flash.events.Event
Event.type property = flash.events.Event.UNLOAD

Dispatched by a LoaderInfoEx object whenever a loaded object is removed by using the unload() method of the LoaderEx object, or when a second load is performed by the same LoaderEx object and the original content is removed prior to the load beginning.