Packagecom.sibirjak.angara.utils
Classpublic class ImageAssetLoader
InheritanceImageAssetLoader Inheritance URLLoaderDelegate Inheritance AbstractResourceLoader Inheritance AbstractLoaderItem Inheritance AbstractProgressInfo Inheritance flash.events.EventDispatcher
ImplementsIDisplayAssetLoader

The ImageAssetLoader loads display assets via an URLLoaderDelegate, which is pretty much faster than using the LoaderDelegate.

After the URLLoaderDelegate has been completed, a new Flash Loader instance is initialised with the loaded binary data (ByteArray).

Its possible to specify a container the loaded content gets added automatically after it is ready to display.



Public Properties
 PropertyDefined by
 InheritedbytesLoaded : uint
Returns the number of bytes already loaded.
AbstractResourceLoader
 InheritedbytesTotal : uint
Returns the number of bytes total.
AbstractResourceLoader
 InheritedcallbackFunction : Function
AbstractResourceLoader
  container : Sprite
Returns the previously defined container.
ImageAssetLoader
 Inheritedcontent : *
Returns a reference to the loaded content.
AbstractResourceLoader
 InheriteddataFormat : String
URLLoaderDelegate
 InheritedfailedLoadingTrials : uint
Returns the number of failed loading trails.
AbstractResourceLoader
 InheritedhttpStatus : int
Returns the http status of a loaded resource.
AbstractResourceLoader
 InheriteditemType : String
The type of the loader item.
AbstractLoaderItem
 Inheritedkey : String
Returns the identifying key of the loader item.
AbstractLoaderItem
 InheritedloadingError : LoadingError
Returns the loading error in a ResourceLoaderEvent.FAILURE event.
AbstractResourceLoader
 InheritedmaxLoadingTrials : uint
Returns the max number of trails in case of failures.
AbstractResourceLoader
 InheritednumItems : uint
Returns the number of items to be loaded within the loader item.
AbstractProgressInfo
 InheritednumItemsFailed : uint
Returns the number of items failed within the loader item.
AbstractProgressInfo
 InheritednumItemsLoaded : uint
Returns the number of items loaded within the loader item.
AbstractProgressInfo
 Inheritedprogress : Number
Returns the progress of the loader item as a decimal value between zero and 1.
AbstractProgressInfo
 Inheritedscheduled : Boolean
Returns true, if the item already has been added to the loader manager directly or to a sequence or a sequence manager.
AbstractLoaderItem
 Inheritedstatus : String
The current loading status.
AbstractLoaderItem
 Inheritedtimeout : uint
Specifies a timeout after that the resource loader will fail.
AbstractResourceLoader
 Inheritedurl : String
Returns the URL of the resource loader.
AbstractResourceLoader
Protected Properties
 PropertyDefined by
 Inherited_dataFormat : String
The data format of the Flash URLLoader content.
URLLoaderDelegate
 Inherited_failedLoadingTrials : uint = 0
Number of failed loading trials.
AbstractResourceLoader
 Inherited_isScheduled : Boolean = false
The schedule marker.
AbstractLoaderItem
 Inherited_key : String
The key used for debugging purposes.
AbstractLoaderItem
 Inherited_loadingError : LoadingError
Loading error information.
AbstractResourceLoader
 Inherited_loadingTrials : uint = 0
Number of loading trials already done.
AbstractResourceLoader
 Inherited_numItems : uint = 0
The number of items added.
AbstractProgressInfo
 Inherited_numItemsFailed : uint = 0
The number of items failed loading.
AbstractProgressInfo
 Inherited_numItemsLoaded : uint = 0
The number of items alredy loaded.
AbstractProgressInfo
 Inherited_progress : Number = 0
The overall progress of the item.
AbstractProgressInfo
 Inherited_request : URLRequest
The request.
AbstractResourceLoader
 Inherited_status : String
The loader item status.
AbstractLoaderItem
 Inherited_type : String
The loader item type.
AbstractLoaderItem
 Inherited_urlLoader : URLLoader
The Flash URLLoader.
URLLoaderDelegate
Public Methods
 MethodDefined by
  
ImageAssetLoader(request:URLRequest)
Creates a new LoaderDelegate instance.
ImageAssetLoader
 Inherited
getProperty(name:String):*
Lets you pull a prior specified runtime property.
AbstractResourceLoader
 Inherited
load():void
Starts loading of the resource.
AbstractResourceLoader
 Inherited
pause():void
Marks the item to be ignored by subsequent loader manager queue pulling operations.
AbstractResourceLoader
 Inherited
resume():void
Marks a prior paused item to be eligible for loader manager queue polling operations.
AbstractResourceLoader
 Inherited
setProperty(name:String, value:*):void
Lets you specify an arbitrary runtime property to be available within each resource loader event.
AbstractResourceLoader
 Inherited
stop():void
Immediately stops loading of the item or its containing items.
AbstractResourceLoader
  
toString():String
Info
ImageAssetLoader
Protected Methods
 MethodDefined by
 Inherited
clear():Boolean
Tries to reset the internal Flash URLLoader.
URLLoaderDelegate
 Inherited
Dispatches the ResourceLoaderEvent.COMPLETE event.
AbstractResourceLoader
 Inherited
Dispatches the ResourceLoaderEvent.FAILURE event.
AbstractResourceLoader
 Inherited
dispatchInit():void
Dispatches the ResourceLoaderEvent.INIT event.
AbstractResourceLoader
 Inherited
Dispatches the ResourceLoaderEvent.LOADING event.
AbstractResourceLoader
 Inherited
Dispatches the ResourceLoaderEvent.TRIAL_FAILURE event.
AbstractResourceLoader
 Inherited
Dispatches the ResourceLoaderEvent.PAUSE event.
AbstractResourceLoader
 Inherited
Dispatches the ResourceLoaderEvent.PROGRESS event.
AbstractResourceLoader
 Inherited
Dispatches the ResourceLoaderEvent.RESUME event.
AbstractResourceLoader
 Inherited
dispatchStop():void
Dispatches the ResourceLoaderEvent.STOP event.
AbstractResourceLoader
  
notifyComplete(content:*):void
A subclass must call notifyComplete in all cases the loading of the resource has been finished successfully.
ImageAssetLoader
 Inherited
notifyFailure(errorType:String, failureMessage:String, error:Error = null):void
A subclass must call notifyFailure in all cases the loading of the resource cannot be accomplished.
AbstractResourceLoader
 Inherited
notifyHttpStatus(status:int):void
A subclass may call notifyHttpStatus to store a http status code.
AbstractResourceLoader
 Inherited
notifyInit(content:*):void
A subclass may call notifyInit if the content is ready for display or any other use.
AbstractResourceLoader
 Inherited
notifyProgress(bytesTotal:uint = 0, bytesLoaded:uint = 0):void
A subclass may call notifyProgress to inform the clients about a change in progess.
AbstractResourceLoader
 Inherited
startLoading():void
Tries to start the internal Flash URLLoader.
URLLoaderDelegate
Property detail
containerproperty
container:Sprite  [read-write]

Returns the previously defined container.

Implementation
    public function get container():Sprite
    public function set container(value:Sprite):void
Constructor detail
ImageAssetLoader()constructor
public function ImageAssetLoader(request:URLRequest)

Creates a new LoaderDelegate instance.

Parameters
request:URLRequest — The request.
Method detail
notifyComplete()method
protected override function notifyComplete(content:*):void

A subclass must call notifyComplete in all cases the loading of the resource has been finished successfully.

Executes the callback before the final COMPLETE event is dispatched.

Parameters
content:* — The loaded content.
toString()method 
public override function toString():String

Info

Returns
String