| Package | away3d.loaders.misc |
| Class | public class SingleFileLoader |
| Inheritance | SingleFileLoader flash.events.EventDispatcher |
See also
| Property | Defined By | ||
|---|---|---|---|
| data : * [read-only] | SingleFileLoader | ||
| dependencies : Vector.<ResourceDependency> [read-only]
A list of dependencies that need to be loaded and resolved for the loaded object. | SingleFileLoader | ||
| loadAsRawData : Boolean [read-only] | SingleFileLoader | ||
| parser : ParserBase [read-only]
A reference to the parser that will translate the loaded data into a usable resource. | SingleFileLoader | ||
| url : String [read-only] | SingleFileLoader | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new SingleFileLoader object. | SingleFileLoader | ||
enableParser(parser:Class):void [static] | SingleFileLoader | ||
enableParsers(parsers:Vector.<Class>):void [static] | SingleFileLoader | ||
load(urlRequest:URLRequest, parser:ParserBase = null, loadAsRawData:Boolean = false):void
Load a resource from a file. | SingleFileLoader | ||
parseData(data:*, parser:ParserBase = null, req:URLRequest = null):void
Loads a resource from already loaded data. | SingleFileLoader | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when an animation node has been constructed from a resource. | SingleFileLoader | |||
| Dispatched when an animation set has been constructed from a group of animation state resources. | SingleFileLoader | |||
| Dispatched when an animation state has been constructed from a group of animation node resources. | SingleFileLoader | |||
| Dispatched when a animator asset has been constructed from a resource. | SingleFileLoader | |||
| Dispatched when any asset finishes parsing. | SingleFileLoader | |||
| Dispatched when a container asset has been constructed from a resource. | SingleFileLoader | |||
| Dispatched when the dependency that this single-file loader was loading complets. | SingleFileLoader | |||
| Dispatched when a geometry asset has been constructed from a resource. | SingleFileLoader | |||
| Dispatched when an error occurs during loading. | SingleFileLoader | |||
| Dispatched when a material asset has been constructed from a resource. | SingleFileLoader | |||
| Dispatched when a skeleton asset has been constructed from a resource. | SingleFileLoader | |||
| Dispatched when a skeleton pose asset has been constructed from a resource. | SingleFileLoader | |||
| Dispatched when an animation state transition has been constructed from a group of animation node resources. | SingleFileLoader | |||
| Dispatched when a texture asset has been constructed from a resource. | SingleFileLoader | |||
| Dispatched when an image assets dimensions are not a power of 2 | SingleFileLoader | |||
| data | property |
data:* [read-only] public function get data():*| dependencies | property |
dependencies:Vector.<ResourceDependency> [read-only] A list of dependencies that need to be loaded and resolved for the loaded object.
public function get dependencies():Vector.<ResourceDependency>| loadAsRawData | property |
loadAsRawData:Boolean [read-only] public function get loadAsRawData():Boolean| parser | property |
parser:ParserBase [read-only] A reference to the parser that will translate the loaded data into a usable resource.
public function get parser():ParserBase| url | property |
url:String [read-only] public function get url():String| SingleFileLoader | () | Constructor |
public function SingleFileLoader()Creates a new SingleFileLoader object.
| enableParser | () | method |
public static function enableParser(parser:Class):voidParameters
parser:Class |
| enableParsers | () | method |
public static function enableParsers(parsers:Vector.<Class>):voidParameters
parsers:Vector.<Class> |
| load | () | method |
public function load(urlRequest:URLRequest, parser:ParserBase = null, loadAsRawData:Boolean = false):voidLoad a resource from a file.
Parameters
urlRequest:URLRequest — The URLRequest object containing the URL of the object to be loaded.
| |
parser:ParserBase (default = null) — An optional parser object that will translate the loaded data into a usable resource. If not provided, AssetLoader will attempt to auto-detect the file type.
| |
loadAsRawData:Boolean (default = false) |
| parseData | () | method |
public function parseData(data:*, parser:ParserBase = null, req:URLRequest = null):voidLoads a resource from already loaded data.
Parameters
data:* — The data to be parsed. Depending on the parser type, this can be a ByteArray, String or XML.
| |
parser:ParserBase (default = null) — The identifier (url or id) of the object to be loaded, mainly used for resource management.
| |
req:URLRequest (default = null) — An optional parser object that will translate the data into a usable resource. If not provided, AssetLoader will attempt to auto-detect the file type.
|
| animationNodeComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when an animation node has been constructed from a resource.
| animationSetComplete | Event |
away3d.events.AssetEventaway3d.events.AssetEventDispatched when an animation set has been constructed from a group of animation state resources.
| 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 the dependency that this single-file loader was loading complets.
| 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.
| 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 assets dimensions are not a power of 2