MediaLoader Class
The Medialoader is the singleton loader for loading all assets including images, data, code and sounds. MediaLoader supports cache-busting in the browser using dynamic query string parameters.
Item Index
Methods
Properties
Methods
_initialize
()
protected
Initilize the object
_loadDone
-
qi
-
result
Alert that the loading is finished
Parameters:
-
qi
cloudkid.LoaderQueueItemThe loader queue item
-
result
ObjectThe event from preloadjs or null
_onLoadCompleted
-
qi
-
ev
The file was loaded successfully
Parameters:
-
qi
cloudkid.LoaderQueueItemThe loader queue item
-
ev
ObjectThe load event
_onLoadFailed
-
qi
There was an error loading the file
Parameters:
-
qi
cloudkid.LoaderQueueItemThe loader queue item
_onLoadProgress
-
qi
-
event
The file load progress event
Parameters:
-
qi
cloudkid.LoaderQueueItemThe loader queue item
-
event
ObjectThe progress event
_tryNextLoad
()
private
Attempt to do the next load
cancel
-
url
Cancel a load that's currently in progress
Parameters:
-
url
StringThe url
Returns:
If canceled returns true, false if not canceled
destroy
()
public
Destroy the MediaLoader singleton, don't use after this
init
()
public
static
Static constructor creating the singleton
load
-
url
-
callback
-
updateCallback
-
priority
-
data
Load a file
Properties
cacheManager
cloudkid.CacheManager
public
The reference to the cache manager
instance
cloudkid.OS
public
static
Static function for getting the singleton instance
maxSimultaneousLoads
Int
public
The maximum number of simulaneous loads
Default: 2
numLoads
Int
private
The current number of items loading
Default: 0