Creates a new instance.
Add one or more file extensions (without leading dot) that identify the supported data types. Used by 'canHandle' to figure out if the factory is suitable for an asset reference.
Add one or more mime types that identify the supported data types. Used by 'canHandle' to figure out if the factory is suitable for an asset reference.
Returns 'true' if this factory can handle the given reference. The default implementation checks if extension and/or mime type of the reference match those of the factory.
This method will only be called if 'canHandle' returned 'true' for the given reference. It's responsible for creating at least one concrete asset and passing it to 'onComplete'.
@param reference The asset to be created. If a local or remote URL is referenced, it will already have been loaded, and 'data' will contain a ByteArray. @param helper Contains useful utility methods to be used by the factory. Look at the class documentation for more information. @param onComplete To be called with the name and asset as parameters when loading is successful.
function(name:string, asset:Object):void;@param onError To be called when creation fails for some reason. Do not call 'onComplete' when that happens.
function(error:string):void
Returns the file extensions this factory supports.
Returns the mime types this factory supports.
Generated using TypeDoc
This AssetFactory creates XML assets, texture atlases and bitmap fonts.