Package | away3d.loading |
Class | public class AssetLoader |
Inheritance | AssetLoader flash.events.EventDispatcher |
See also
Property | Defined by | ||
---|---|---|---|
dependencies : Vector [read-only]
A list of dependencies that need to be loaded and resolved for the loaded object.
| AssetLoader | ||
eventVerbosity : int
The threshold that define which events are dispatched.
| AssetLoader | ||
handle : IResource
[read-only]
The object that will contain all the loaded and parsed data.
| AssetLoader | ||
parser : ParserBase
[read-only]
A reference to the parser that will translate the loaded data into a usable resource.
| AssetLoader |
Method | Defined by | ||
---|---|---|---|
AssetLoader
()
Creates a new AssetLoader object.
| AssetLoader | ||
load(urlRequest:URLRequest, parser:Class = null):void
Load a resource from a file.
| AssetLoader | ||
parseData(data:*, uri:String, parser:Class = null):void
Loads a resource from already loaded data.
| AssetLoader |
Constant | Defined by | ||
---|---|---|---|
LEVEL_1 : int = 1 [static]
| AssetLoader | ||
LEVEL_2 : int = 2 [static]
| AssetLoader | ||
SILENT : int = 0 [static]
| AssetLoader |
dependencies | property |
dependencies:Vector
[read-only]A list of dependencies that need to be loaded and resolved for the loaded object.
Implementation public function get dependencies():Vector
eventVerbosity | property |
eventVerbosity:int
[read-write]The threshold that define which events are dispatched.
Implementation public function get eventVerbosity():int
public function set eventVerbosity(value:int):void
handle | property |
handle:IResource
[read-only]The object that will contain all the loaded and parsed data.
Implementation public function get handle():IResource
parser | property |
parser:ParserBase
[read-only]A reference to the parser that will translate the loaded data into a usable resource.
Implementation public function get parser():ParserBase
AssetLoader | () | constructor |
public function AssetLoader()
Init Parameters
load | () | method |
public function load(urlRequest:URLRequest, parser:Class = null):void
Load a resource from a file.
ParametersurlRequest:URLRequest — The URLRequest object containing the URL of the object to be loaded.
|
|
parser:Class (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.
|
parseData | () | method |
public function parseData(data:*, uri:String, parser:Class = null):void
Loads a resource from already loaded data.
Parametersdata:* — The data to be parsed. Depending on the parser type, this can be a ByteArray, String or XML.
|
|
uri:String — The identifier (url or id) of the object to be loaded, mainly used for resource management.
|
|
parser:Class (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.
|
LEVEL_1 | constant |
public static const LEVEL_1:int = 1
LEVEL_2 | constant |
public static const LEVEL_2:int = 2
SILENT | constant |
public static const SILENT:int = 0