Packageorg.puremvc.as3.utilities.loadup.assetloader.model
Classpublic class AssetTypeMapBase
ImplementsIAssetTypeMap
SubclassesFlashAssetTypeMap, FlexAssetTypeMap

Abstract class. Subclasses must set the map property; see class FlexAssetTypeMap as an example.

An asset must have a type; the default types are Image, Text, Swf, Sound and Video.

Each asset type maps to...

LoaderContext is relevant when Loader.load() requires a non-null context argument.

URLRequest is relevant, as used by loaders, when it requires particular property settings, for example, the requestHeaders property.

Loader dataFormat is relevant when the loader is required to use a dataFormat other than its default.

It is assumed that a type that maps to a LoaderContext object, must also map to the AssetLoadByLoader class in the main map. Likewise, it is assumed that a type that maps to a loader dataFormat object, must also map to the AssetLoadByURLLoader class in the main map.



Protected Properties
 PropertyDefined by
  map : Object
Must be populated by a subclass, with each property being set by a statement like the following

map[ asset type string ] = [ asset type class, asset type loader ];

See class FlexAssetTypeMap as an example of a subclass.
AssetTypeMapBase
  mapToLoaderContext : Object
Could be empty, only use when required.
AssetTypeMapBase
  mapToLoaderDataFormat : Object
Could be empty, only use when required.
AssetTypeMapBase
  mapToURLRequest : Object
Could be empty, only use when required.
AssetTypeMapBase
Public Methods
 MethodDefined by
  
AssetTypeMapBase(mapToLoaderContext:Object = null, mapToURLRequest:Object = null, mapToLoaderDataFormat:Object = null)
AssetTypeMapBase
  
getAssetClass(assetType:String):Class
AssetTypeMapBase
  
getAssetLoaderClass(assetType:String):Class
AssetTypeMapBase
  
getLoaderContext(assetType:String):*
AssetTypeMapBase
  
getLoaderDataFormat(assetType:String):String
AssetTypeMapBase
  
getURLRequest(assetType:String):URLRequest
AssetTypeMapBase
Protected Methods
 MethodDefined by
  
AssetTypeMapBase
  
AssetTypeMapBase
  
AssetTypeMapBase
Property detail
mapproperty
protected var map:Object

Must be populated by a subclass, with each property being set by a statement like the following

map[ asset type string ] = [ asset type class, asset type loader ];

See class FlexAssetTypeMap as an example of a subclass.
mapToLoaderContextproperty 
protected var mapToLoaderContext:Object

Could be empty, only use when required.

mapToLoaderDataFormatproperty 
protected var mapToLoaderDataFormat:Object

Could be empty, only use when required.

mapToURLRequestproperty 
protected var mapToURLRequest:Object

Could be empty, only use when required.

Constructor detail
AssetTypeMapBase()constructor
public function AssetTypeMapBase(mapToLoaderContext:Object = null, mapToURLRequest:Object = null, mapToLoaderDataFormat:Object = null)Parameters
mapToLoaderContext:Object (default = null)
 
mapToURLRequest:Object (default = null)
 
mapToLoaderDataFormat:Object (default = null)
Method detail
defaultMapToLoaderContext()method
protected function defaultMapToLoaderContext():Object

Returns
Object
defaultMapToLoaderDataFormat()method 
protected function defaultMapToLoaderDataFormat():Object

Returns
Object
defaultMapToURLRequest()method 
protected function defaultMapToURLRequest():Object

Returns
Object
getAssetClass()method 
public function getAssetClass(assetType:String):ClassParameters
assetType:String

Returns
Class
getAssetLoaderClass()method 
public function getAssetLoaderClass(assetType:String):ClassParameters
assetType:String

Returns
Class
getLoaderContext()method 
public function getLoaderContext(assetType:String):*Parameters
assetType:String

Returns
*
getLoaderDataFormat()method 
public function getLoaderDataFormat(assetType:String):StringParameters
assetType:String

Returns
String
getURLRequest()method 
public function getURLRequest(assetType:String):URLRequestParameters
assetType:String

Returns
URLRequest