| Package | away3d.loaders |
| Class | public class AssetLoader |
| Inheritance | AssetLoader flash.events.EventDispatcher |
See also
| Method | Defined By | ||
|---|---|---|---|
Create a new ResourceLoadSession object. | AssetLoader | ||
enableParser(parserClass:Class):void [static] | AssetLoader | ||
enableParsers(parserClasses:Vector.<Class>):void [static] | AssetLoader | ||
load(req:URLRequest, context:AssetLoaderContext = null, ns:String = null, parser:ParserBase = null):AssetLoaderToken
Loads a file and (optionally) all of its dependencies. | AssetLoader | ||
loadData(data:*, id:String, context:AssetLoaderContext = null, ns:String = null, parser:ParserBase = null):AssetLoaderToken
Loads a resource from already loaded data. | AssetLoader | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when an animation set has been constructed from a group of animation state resources. | AssetLoader | |||
| Dispatched when an animation node has been constructed from a resource. | AssetLoader | |||
| Dispatched when an animation state has been constructed from a group of animation node resources. | AssetLoader | |||
| Dispatched when a animator asset has been constructed from a resource. | AssetLoader | |||
| Dispatched when any asset finishes parsing. | AssetLoader | |||
| Dispatched when a container asset has been constructed from a resource. | AssetLoader | |||
| Dispatched when a single dependency (which may be the main file of a resource) finishes loading. | AssetLoader | |||
| Dispatched when a geometry asset has been constructed from a resource. | AssetLoader | |||
| Dispatched when an error occurs during loading. | AssetLoader | |||
| Dispatched when a material asset has been constructed from a resource. | AssetLoader | |||
| Dispatched when a full resource (including dependencies) finishes loading. | AssetLoader | |||
| Dispatched when a skeleton asset has been constructed from a resource. | AssetLoader | |||
| Dispatched when a skeleton pose asset has been constructed from a resource. | AssetLoader | |||
| Dispatched when an animation state transition has been constructed from a group of animation node resources. | AssetLoader | |||
| Dispatched when a texture asset has been constructed from a resource. | AssetLoader | |||
| Dispatched when an image asset dimensions are not a power of 2 | AssetLoader | |||
| AssetLoader | () | Constructor |
public function AssetLoader()Create a new ResourceLoadSession object.
| enableParser | () | method |
public static function enableParser(parserClass:Class):voidParameters
parserClass:Class |
| enableParsers | () | method |
public static function enableParsers(parserClasses:Vector.<Class>):voidParameters
parserClasses:Vector.<Class> |
| load | () | method |
public function load(req:URLRequest, context:AssetLoaderContext = null, ns:String = null, parser:ParserBase = null):AssetLoaderTokenLoads a file and (optionally) all of its dependencies.
Parameters
req:URLRequest — The URLRequest object containing the URL of the file to be loaded.
| |
context:AssetLoaderContext (default = null) — An optional context object providing additional parameters for loading
| |
ns:String (default = null) — An optional namespace string under which the file is to be loaded, allowing the differentiation of two resources with identical assets
| |
parser:ParserBase (default = null) — An optional parser object for translating the loaded data into a usable resource. If not provided, AssetLoader will attempt to auto-detect the file type.
|
AssetLoaderToken |
| loadData | () | method |
public function loadData(data:*, id:String, context:AssetLoaderContext = null, ns:String = null, parser:ParserBase = null):AssetLoaderTokenLoads a resource from already loaded data.
Parameters
data:* — The data object containing all resource information.
| |
id:String — An optional context object providing additional parameters for loading
| |
context:AssetLoaderContext (default = null) — An optional namespace string under which the file is to be loaded, allowing the differentiation of two resources with identical assets
| |
ns:String (default = null) — An optional parser object for translating the loaded data into a usable resource. If not provided, AssetLoader will attempt to auto-detect the file type.
| |
parser:ParserBase (default = null) |
AssetLoaderToken |
| animationNodeComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when an animation set has been constructed from a group of animation state resources.
| animationSetComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when an animation node has been constructed from a resource.
| animationStateComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when an animation state has been constructed from a group of animation node resources.
| animatorComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when a animator asset has been constructed from a resource.
| assetComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when any asset finishes parsing. Also see specific events for each individual asset type (meshes, materials et c.)
| containerComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when a container asset has been constructed from a resource.
| dependencyComplete | Event |
away3d.events.LoaderEventaway3d.events.LoaderEventDispatched when a single dependency (which may be the main file of a resource) finishes loading.
| geometryComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when a geometry asset has been constructed from a resource.
| loadError | Event |
away3d.events.LoaderEventaway3d.events.LoaderEventDispatched when an error occurs during loading.
| materialComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when a material asset has been constructed from a resource.
| resourceComplete | Event |
away3d.events.LoaderEventaway3d.events.LoaderEventDispatched when a full resource (including dependencies) finishes loading.
| skeletonComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when a skeleton asset has been constructed from a resource.
| skeletonPoseComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when a skeleton pose asset has been constructed from a resource.
| stateTransitionComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when an animation state transition has been constructed from a group of animation node resources.
| textureComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when a texture asset has been constructed from a resource.
| textureSizeError | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when an image asset dimensions are not a power of 2