| Package | de.mightypirates.utils.interfaces |
| Interface | public interface IResourceProvider |
| Implementors | ResourceProvider |
ResourceProvider class. See class itself for
more information.
| Property | Defined by | ||
|---|---|---|---|
| basePath : String
Base path used to resolve relative URLs.
| IResourceProvider | ||
| bundles : Vector [read-only]
All resource bundles known by this provider.
| IResourceProvider | ||
| Method | Defined by | ||
|---|---|---|---|
|
addBundle(bundle:IResourceBundle, priority:uint = 0):void
Adds a new bundle with the given priority.
| IResourceProvider | ||
|
basePathFromLoaderInfo(loaderInfo:LoaderInfo):void
Sets the basePath by extracting the proper path from the URL of the
containing SWF.
| IResourceProvider | ||
|
load(request:URLRequest, datatype:String, context:int = null, priority:* = 0):IResourceLoader
Starts loading a resource from the given location and returns an object
allowing to track the progress.
| IResourceProvider | ||
|
removeBundle(bundle:IResourceBundle):void
Removes the given bundle from the list of known resource bundles, if it
is known.
| IResourceProvider | ||
| basePath | property |
basePath:String [read-write]Base path used to resolve relative URLs.
Implementation public function get basePath():String
public function set basePath(value:String):void
| bundles | property |
bundles:Vector [read-only]All resource bundles known by this provider.
IMPORTANT: this generates a new vector on each call, so store it where appropriate.
Implementation public function get bundles():Vector
| addBundle | () | method |
public function addBundle(bundle:IResourceBundle, priority:uint = 0):voidAdds a new bundle with the given priority.
Resource bundles with higher priority will be queried first. The order of two bundles with the same priority is undefined (can be random).
If this bundle had been added before, it'll be removed before the insert, to avoid duplicate entries.
Parametersbundle:IResourceBundle — the resource bundle to add.
|
|
priority:uint (default = 0) — the priority with which the bundle should be queried.
|
| basePathFromLoaderInfo | () | method |
public function basePathFromLoaderInfo(loaderInfo:LoaderInfo):voidSets the basePath by extracting the proper path from the URL of the containing SWF.
ParametersloaderInfo:LoaderInfo |
| load | () | method |
public function load(request:URLRequest, datatype:String, context:int = null, priority:* = 0):IResourceLoaderStarts loading a resource from the given location and returns an object allowing to track the progress.
The function must not throw for any other reason, instead an error event should be thrown.
Parametersrequest:URLRequest — the url from which to load the resource (identifier).
|
|
datatype:String — the resource type.
|
|
context:int (default = null) — loader context to use for some loaders. Note that some
resource bundles may choose to ignore this parameter.
|
|
priority:* (default = 0) — an optional urgency that this request should be processed
with, where higher means less urgent. This may be ignored
by certain ResourceBundle implementations.
|
IResourceLoader —
a loader object which can be used to track the progress.
|
— if the given datatype is not supported by any of
the resource bundles registered with the provider, or if the
data type is set to 'automatic' but cannot be resolved.
|
| removeBundle | () | method |
public function removeBundle(bundle:IResourceBundle):voidRemoves the given bundle from the list of known resource bundles, if it is known.
Parametersbundle:IResourceBundle — the resource bundle to remove.
|