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 |
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):void
Parameters
parser:Class |
enableParsers | () | method |
public static function enableParsers(parsers:Vector.<Class>):void
Parameters
parsers:Vector.<Class> |
load | () | method |
public function load(urlRequest:URLRequest, parser:ParserBase = null, loadAsRawData:Boolean = false):void
Load 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):void
Loads 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.AssetEvent
away3d.events.AssetEvent
Dispatched when an animation node has been constructed from a resource.
animationSetComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when an animation set has been constructed from a group of animation state resources.
animationStateComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when an animation state has been constructed from a group of animation node resources.
animatorComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a animator asset has been constructed from a resource.
assetComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when any asset finishes parsing. Also see specific events for each individual asset type (meshes, materials et c.)
containerComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a container asset has been constructed from a resource.
dependencyComplete | Event |
away3d.events.LoaderEvent
away3d.events.LoaderEvent
Dispatched when the dependency that this single-file loader was loading complets.
geometryComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a geometry asset has been constructed from a resource.
loadError | Event |
away3d.events.LoaderEvent
away3d.events.LoaderEvent
Dispatched when an error occurs during loading.
materialComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a material asset has been constructed from a resource.
skeletonComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a skeleton asset has been constructed from a resource.
skeletonPoseComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a skeleton pose asset has been constructed from a resource.
stateTransitionComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when an animation state transition has been constructed from a group of animation node resources.
textureComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a texture asset has been constructed from a resource.