| Package | de.mightypirates.utils.loading |
| Class | public class TimeoutLoader |
| Inheritance | TimeoutLoader ResourceLoader flash.events.EventDispatcher |
Basically all this class does is wait one frame before firing the finalizing event (completion per default). Subclasses should create the actual instances of the loaded objects.
| Property | Defined by | ||
|---|---|---|---|
![]() | bundle_ : IResourceBundle
Resource bundle that created this instance.
| ResourceLoader | |
| clazz_ : Class The resource class to create a new instance of
| TimeoutLoader | ||
![]() | context_ : * Optional context information for the loader.
| ResourceLoader | |
![]() | data_ : * Data representing the actual loaded resource.
| ResourceLoader | |
![]() | datatype_ : String Type of the loaded data.
| ResourceLoader | |
![]() | display_ : DisplayObject Wrapper display object container for loaders of visual content.
| ResourceLoader | |
![]() | priority_ : int Priority for this load.
| ResourceLoader | |
![]() | request_ : URLRequest URLRequest that triggered this load.
| ResourceLoader | |
| Method | Defined by | ||
|---|---|---|---|
|
TimeoutLoader(bundle:IResourceBundle, request:URLRequest, datatype:String, clazz:Class)
Creates a new timeout based loader with the given properties.
| TimeoutLoader | ||
|
unload():void
Unloads the resource loaded via this loader.
| TimeoutLoader | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
addAsListenerTo(dispatcher:IEventDispatcher):void
Adds this instance as a listener for the following events to the given
dispatcher:
Event.COMPLETE, IOErrorEvent.IO_ERROR, SecurityErrorEvent.SECURITY_ERROR and ProgressEvent.PROGRESS The events are handled by these overridable functions: handleComplete, handleError, handleSecurityError and handleProgress By default, they just forward the event by redispatching it via this instance. | ResourceLoader | |
![]() |
handleComplete(e:Event):void
Default handler for completion events.
| ResourceLoader | |
![]() |
handleError(e:ErrorEvent):void
Default handler for error events.
| ResourceLoader | |
![]() |
handleProgress(e:ProgressEvent):void
Default handler for progress events.
| ResourceLoader | |
|
load():void
Actual loading, after this the data_ of the loader should be set.
| TimeoutLoader | ||
![]() |
removeAsListener(dispatcher:IEventDispatcher):void
This function is called by the default handlers for the completion and
error events and removes this loader as a listener from the dispatcher.
| ResourceLoader | |
| clazz_ | property |
protected var clazz_:ClassThe resource class to create a new instance of
| TimeoutLoader | () | constructor |
public function TimeoutLoader(bundle:IResourceBundle, request:URLRequest, datatype:String, clazz:Class)Creates a new timeout based loader with the given properties.
Parametersbundle:IResourceBundle |
|
request:URLRequest |
|
datatype:String |
|
clazz:Class |
| load | () | method |
protected function load():voidActual loading, after this the data_ of the loader should be set. Otherwise an error should be thrown.
| unload | () | method |
public override function unload():voidUnloads the resource loaded via this loader. For some resources which do not require / allow for explicit disposal this may do nothing.