Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ByteArrayFactory

This AssetFactory forwards ByteArrays to the AssetManager. It's the fallback when no other factory can handle an asset reference (default priority: -100).

Hierarchy

Index

Constructors

constructor

Properties

priority

priority: number

Methods

addExtensions

  • addExtensions(args: Array<string>): void

addMimeTypes

  • addMimeTypes(args: Array<string>): void

canHandle

create

  • 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

    Parameters

    • reference: AssetReference
    • helper: AssetFactoryHelper
    • onComplete: function
        • (string: any, any: any): void
        • Parameters

          • string: any
          • any: any

          Returns void

    • onError: function
        • (string: any): void
        • Parameters

          • string: any

          Returns void

    Returns void

getExtensions

  • getExtensions(out?: Vector<string>): Vector<string>

getMimeTypes

  • getMimeTypes(out?: Vector<string>): Vector<string>

Protected get_priority

  • get_priority(): number

Protected set_priority

  • set_priority(value: number): number

Generated using TypeDoc