Package | starling.assets |
Class | public class XmlFactory |
Inheritance | XmlFactory AssetFactory Object |
Method | Defined By | ||
---|---|---|---|
Creates a new instance. | XmlFactory | ||
addExtensions(... args):void Add one or more file extensions (without leading dot) that identify the supported data
types. | AssetFactory | ||
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 | ||
getExtensions(out:Vector.<String> = null):Vector.<String> Returns the file extensions this factory supports. | AssetFactory | ||
getMimeTypes(out:Vector.<String> = null):Vector.<String> Returns the mime types this factory supports. | AssetFactory |
XmlFactory | () | Constructor |
public function XmlFactory()
Creates a new instance.
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 |
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 |