Package | impression.resolver |
Class | public class LoaderEx |
Inheritance | LoaderEx ![]() |
See also
Property | Defined By | ||
---|---|---|---|
contentLoaderInfoEx : LoaderInfoEx [read-only]
The LoaderInfoEx object associated with this object. | LoaderEx | ||
lastAsset : AssetData [read-only] | LoaderEx | ||
lastEvent : Event [read-only]
A copy of the most recent event object dispatched by the base class. | LoaderEx | ||
lastRequest : URLRequest [read-only] | LoaderEx | ||
owner : * [read-only]
The owner of the object. | LoaderEx | ||
resolver : AssetResolver [read-only]
The AssetResolver associated with the object. | LoaderEx |
Method | Defined By | ||
---|---|---|---|
LoaderEx(owner:* = null, resolver:AssetResolver = null)
Creates a new instance of the LoaderEx class. | LoaderEx | ||
close():void [override]
Closes the load operation in progress. | LoaderEx | ||
load(request:URLRequest, context:LoaderContext = null):void [override]
Loads a SWF, JPEG, progressive JPEG, unanimated GIF, or PNG file into an object that is a child of this LoaderEx object. | LoaderEx | ||
Begins loading an asset. | LoaderEx |
contentLoaderInfoEx | property |
contentLoaderInfoEx:LoaderInfoEx
[read-only] The LoaderInfoEx object associated with this object. The LoaderInfoEx extends the LoaderInfo object and provides additional information and events.
public function get contentLoaderInfoEx():LoaderInfoEx
See also
lastAsset | property |
lastEvent | property |
lastEvent:Event
[read-only] A copy of the most recent event object dispatched by the base class.
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.
public function get lastEvent():Event
lastRequest | property |
lastRequest:URLRequest
[read-only] public function get lastRequest():URLRequest
owner | property |
owner:*
[read-only] The owner of the object.
public function get owner():*
resolver | property |
resolver:AssetResolver
[read-only] The AssetResolver associated with the object.
The resolver is used to retrieve the fully-qualified URI when the loadAsset
method is invoked. The object
also reports state change event information to the resolver during the load cycle; allowing for aggregate information to
be retrieved from either the resolver and/or the ResolverInfo object for this object's owner
.
public function get resolver():AssetResolver
See also
LoaderEx | () | Constructor |
public function LoaderEx(owner:* = null, resolver:AssetResolver = null)
Creates a new instance of the LoaderEx class.
Parametersowner:* (default = null ) — The object that the state information for this object should be reported to.
| |
resolver:AssetResolver (default = null ) — The AssetResolver to associate with this object.
|
close | () | method |
override public function close():void
Closes the load operation in progress.
Any load operation in progress is immediately terminated. If a load operation was in progress, then
the Event.CLOSE
event is dispatched by the LoaderInfoEx object associated with this instance.
Unlike the Loader
class, if no current URL is being loaded, no error is thrown.
load | () | method |
override public function load(request:URLRequest, context:LoaderContext = null):void
Loads a SWF, JPEG, progressive JPEG, unanimated GIF, or PNG file into an object that is a child of this LoaderEx object.
The LoaderEx class overrides the default behavior of the Loader object in the following manner:
kbps
value is reset.active
property value is false
, it is set to true
and the
ResolverEvent.BEGIN
event is dispatched by the LoaderInfoEx object associated with this instance.
The event passes the request
parameter as the event's relatedObject
member.request
parameter is saved as the lastRequest
, and the Loader's load
method is invoked.load
method, or the request
parameter is null
, the ResolverEvent.END
event is dispatched with the request
parameter as the event's relatedObject
member.request
parameter is not null
, the error is thrown.Parameters
request:URLRequest — The URLRequest to load.
| |
context:LoaderContext (default = null ) — An optional LoaderContext object, which has properties that define the following:
|
Error — [the error that occured] (Error).
|
See also
loadAsset | () | method |
public function loadAsset(asset:AssetData, context:LoaderContext = null):void
Begins loading an asset.
This method invokes the resolver
property's getURLRequest
with the asset
parameter, then invokes its own load
method with the returned request.
Parameters
asset:AssetData — The asset to load.
| |
context:LoaderContext (default = null ) — An optional LoaderContext object, which has properties that define the following:
|
IllegalOperationError cannot — load asset without resolver (IllegalOperationError).
|
See also