Packageaway3d.library
Classpublic class AssetLibrary
InheritanceAssetLibrary Inheritance Object

AssetLibrary enforces a singleton pattern and is not intended to be instanced. It's purpose is to allow access to the default library bundle through a set of static shortcut methods. If you are interested in creating multiple library bundles, please use the getBundle() method.



Public Properties
 PropertyDefined By
  conflictPrecedence : String
[static] Short-hand for conflictPrecedence property on default asset library bundle.
AssetLibrary
  conflictStrategy : ConflictStrategyBase
[static] Short-hand for conflictStrategy property on default asset library bundle.
AssetLibrary
Public Methods
 MethodDefined By
  
AssetLibrary(se:AssetLibrarySingletonEnforcer)
Creates a new AssetLibrary object.
AssetLibrary
  
addAsset(asset:IAsset):void
[static] Short-hand for addAsset() method on default asset library bundle.
AssetLibrary
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[static] Short-hand for addEventListener() method on default asset library bundle.
AssetLibrary
  
createIterator(assetTypeFilter:String = null, namespaceFilter:String = null, filterFunc:Function = null):AssetLibraryIterator
[static] Short-hand for createIterator() method on default asset library bundle.
AssetLibrary
  
enableParser(parserClass:Class):void
[static]
AssetLibrary
  
enableParsers(parserClasses:Vector.<Class>):void
[static]
AssetLibrary
  
getAsset(name:String, ns:String = null):IAsset
[static] Short-hand for getAsset() method on default asset library bundle.
AssetLibrary
  
getBundle(key:String = default):AssetLibraryBundle
[static] Returns an AssetLibrary bundle instance.
AssetLibrary
  
hasEventListener(type:String):Boolean
[static] Short-hand for hasEventListener() method on default asset library bundle.
AssetLibrary
  
load(req:URLRequest, context:AssetLoaderContext = null, ns:String = null, parser:ParserBase = null):AssetLoaderToken
[static] Short-hand for load() method on default asset library bundle.
AssetLibrary
  
loadData(data:*, context:AssetLoaderContext = null, ns:String = null, parser:ParserBase = null):AssetLoaderToken
[static] Short-hand for loadData() method on default asset library bundle.
AssetLibrary
  
removeAllAssets(dispose:Boolean = true):void
[static] Short-hand for removeAllAssets() method on default asset library bundle.
AssetLibrary
  
removeAsset(asset:IAsset, dispose:Boolean = true):void
[static] Short-hand for removeAsset() method on default asset library bundle.
AssetLibrary
  
removeAssetByName(name:String, ns:String = null, dispose:Boolean = true):IAsset
[static] Short-hand for removeAssetByName() method on default asset library bundle.
AssetLibrary
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[static] Short-hand for removeEventListener() method on default asset library bundle.
AssetLibrary
  
removeNamespaceAssets(ns:String = null, dispose:Boolean = true):void
[static] Short-hand for removeNamespaceAssets() method on default asset library bundle.
AssetLibrary
  
willTrigger(type:String):Boolean
[static]
AssetLibrary
Property Detail
_instancesproperty
arcane static var _instances:Object

conflictPrecedenceproperty 
conflictPrecedence:String

Short-hand for conflictPrecedence property on default asset library bundle.


Implementation
    public static function get conflictPrecedence():String
    public static function set conflictPrecedence(value:String):void

See also

away3d.library.AssetLibraryBundle.conflictPrecedence
conflictStrategyproperty 
conflictStrategy:ConflictStrategyBase

Short-hand for conflictStrategy property on default asset library bundle.


Implementation
    public static function get conflictStrategy():ConflictStrategyBase
    public static function set conflictStrategy(value:ConflictStrategyBase):void

See also

away3d.library.AssetLibraryBundle.conflictStrategy
Constructor Detail
AssetLibrary()Constructor
public function AssetLibrary(se:AssetLibrarySingletonEnforcer)

Creates a new AssetLibrary object.

Parameters
se:AssetLibrarySingletonEnforcer — A singleton enforcer for the AssetLibrary ensuring it cannnot be instanced.
Method Detail
addAsset()method
public static function addAsset(asset:IAsset):void

Short-hand for addAsset() method on default asset library bundle.

Parameters

asset:IAsset

See also

away3d.library.AssetLibraryBundle.addAsset()
addEventListener()method 
public static function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

Short-hand for addEventListener() method on default asset library bundle.

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = false)

createIterator()method 
public static function createIterator(assetTypeFilter:String = null, namespaceFilter:String = null, filterFunc:Function = null):AssetLibraryIterator

Short-hand for createIterator() method on default asset library bundle.

Parameters

assetTypeFilter:String (default = null)
 
namespaceFilter:String (default = null)
 
filterFunc:Function (default = null)

Returns
AssetLibraryIterator

See also

away3d.library.AssetLibraryBundle.createIterator()
enableParser()method 
public static function enableParser(parserClass:Class):void

Parameters

parserClass:Class

enableParsers()method 
public static function enableParsers(parserClasses:Vector.<Class>):void

Parameters

parserClasses:Vector.<Class>

getAsset()method 
public static function getAsset(name:String, ns:String = null):IAsset

Short-hand for getAsset() method on default asset library bundle.

Parameters

name:String
 
ns:String (default = null)

Returns
IAsset

See also

away3d.library.AssetLibraryBundle.getAsset()
getBundle()method 
public static function getBundle(key:String = default):AssetLibraryBundle

Returns an AssetLibrary bundle instance. If no key is given, returns the default bundle (which is similar to using the AssetLibraryBundle as a singleton). To keep several separated library bundles, pass a string key to this method to define which bundle should be returned. This is referred to as using the AssetLibraryBundle as a multiton.

Parameters

key:String (default = default) — Defines which multiton instance should be returned.

Returns
AssetLibraryBundle — An instance of the asset library
hasEventListener()method 
public static function hasEventListener(type:String):Boolean

Short-hand for hasEventListener() method on default asset library bundle.

Parameters

type:String

Returns
Boolean
load()method 
public static function load(req:URLRequest, context:AssetLoaderContext = null, ns:String = null, parser:ParserBase = null):AssetLoaderToken

Short-hand for load() method on default asset library bundle.

Parameters

req:URLRequest
 
context:AssetLoaderContext (default = null)
 
ns:String (default = null)
 
parser:ParserBase (default = null)

Returns
AssetLoaderToken

See also

away3d.library.AssetLibraryBundle.load()
loadData()method 
public static function loadData(data:*, context:AssetLoaderContext = null, ns:String = null, parser:ParserBase = null):AssetLoaderToken

Short-hand for loadData() method on default asset library bundle.

Parameters

data:*
 
context:AssetLoaderContext (default = null)
 
ns:String (default = null)
 
parser:ParserBase (default = null)

Returns
AssetLoaderToken

See also

away3d.library.AssetLibraryBundle.loadData()
removeAllAssets()method 
public static function removeAllAssets(dispose:Boolean = true):void

Short-hand for removeAllAssets() method on default asset library bundle.

Parameters

dispose:Boolean (default = true) — Defines whether the assets should also be disposed.

See also

away3d.library.AssetLibraryBundle.removeAllAssets()
removeAsset()method 
public static function removeAsset(asset:IAsset, dispose:Boolean = true):void

Short-hand for removeAsset() method on default asset library bundle.

Parameters

asset:IAsset — The asset which should be removed from the library.
 
dispose:Boolean (default = true) — Defines whether the assets should also be disposed.

See also

away3d.library.AssetLibraryBundle.removeAsset()
removeAssetByName()method 
public static function removeAssetByName(name:String, ns:String = null, dispose:Boolean = true):IAsset

Short-hand for removeAssetByName() method on default asset library bundle.

Parameters

name:String — The name of the asset to be removed.
 
ns:String (default = null) — The namespace to which the desired asset belongs.
 
dispose:Boolean (default = true) — Defines whether the assets should also be disposed.

Returns
IAsset

See also

away3d.library.AssetLibraryBundle.removeAssetByName()
removeEventListener()method 
public static function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Short-hand for removeEventListener() method on default asset library bundle.

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)

removeNamespaceAssets()method 
public static function removeNamespaceAssets(ns:String = null, dispose:Boolean = true):void

Short-hand for removeNamespaceAssets() method on default asset library bundle.

Parameters

ns:String (default = null)
 
dispose:Boolean (default = true)

See also

away3d.library.AssetLibraryBundle.removeNamespaceAssets()
willTrigger()method 
public static function willTrigger(type:String):Boolean

Parameters

type:String

Returns
Boolean