springroll.Loader Class

Defined in: springroll.Loader:12
Module: Core

The Loader is the singular loader for loading all assets including images, data, code and sounds. Loader supports cache-busting in the browser using dynamic query string parameters.

_getItem

() springroll.LoaderItem
private

Defined in _getItem:181

Get a Queue item from the pool or new

Returns:

springroll.LoaderItem:

The Queue item to use

_onComplete

(
  • complete
  • item
  • result
)
private

Defined in _onComplete:139

Handler for the file complete

Parameters:

_putItem

(
  • item
)
private

Defined in _putItem:193

Pool the loader queue item

Parameters:

cancel

(
  • url
)
Bool
public

Defined in cancel:161

Cancel a load that's currently in progress

Parameters:

Returns:

Bool:

If canceled returns true, false if not canceled

destroy

()
public

Defined in destroy:76

Destroy the Loader singleton, don't use after this

load

(
  • url
  • complete
  • [progress]
  • [data]
)
createjs.LoadQueue
public

Defined in load:100

Load a file

Parameters:

  • url String

    The file path to load

  • complete Function

    The callback function when completed

  • [progress] Function optional

    The callback for load progress update, passes 0-1 as param

  • [data] optional

    optional data

Returns:

createjs.LoadQueue:

The load queue item

app

springroll.Application private

Defined in app:20

The current application

cacheManager

CacheManager public

Defined in cacheManager:35

The reference to the cache manager

instance

springroll.Loader#instance deprecated static

Defined in instance:53

Deprecated: since version 0.4.0

See loader

itemPool

Array private

Defined in itemPool:49

The pool of LoaderItems

items

Object private

Defined in items:42

The collection of LoaderItems by url

maxCurrentLoads

Int public

Defined in maxCurrentLoads:27

The maximum number of simulaneous loads

Default: 2

verbose

Boolean

Defined in verbose:62

If the logging should be verbose (unminified library only)

Default: false