Packagestarling.assets
Classpublic class XmlFactory
InheritanceXmlFactory Inheritance AssetFactory Inheritance Object

This AssetFactory creates XML assets, texture atlases and bitmap fonts.



Public Properties
 PropertyDefined By
 Inheritedpriority : int
AssetFactory
Public Methods
 MethodDefined By
  
Creates a new instance.
XmlFactory
 Inherited
addExtensions(... args):void
Add one or more file extensions (without leading dot) that identify the supported data types.
AssetFactory
 Inherited
addMimeTypes(... args):void
Add one or more mime types that identify the supported data types.
AssetFactory
  
canHandle(reference:AssetReference):Boolean
[override] Returns true if mime type or extension fit for XML data, or if the data starts with a "<" character.
XmlFactory
  
create(reference:AssetReference, helper:AssetFactoryHelper, onComplete:Function, onError:Function):void
[override] Creates the XML asset and passes it to 'onComplete'.
XmlFactory
 Inherited
getExtensions(out:Vector.<String> = null):Vector.<String>
Returns the file extensions this factory supports.
AssetFactory
 Inherited
getMimeTypes(out:Vector.<String> = null):Vector.<String>
Returns the mime types this factory supports.
AssetFactory
Constructor Detail
XmlFactory()Constructor
public function XmlFactory()

Creates a new instance.

Method Detail
canHandle()method
override public function canHandle(reference:AssetReference):Boolean

Returns true if mime type or extension fit for XML data, or if the data starts with a "<" character.

Parameters

reference:AssetReference

Returns
Boolean
create()method 
override public function create(reference:AssetReference, helper:AssetFactoryHelper, onComplete:Function, onError:Function):void

Creates the XML asset and passes it to 'onComplete'. If the XML contains a TextureAtlas or a BitmapFont, adds suitable post processors.

Parameters

reference:AssetReference
 
helper:AssetFactoryHelper
 
onComplete:Function
 
onError:Function