LoadTask Class
Load task is a common type of task used for loading assets through the MediaLoader
Constructor
LoadTask
-
id -
url -
callback -
updateCallback -
priority -
data
Item Index
Properties
Methods
cancel
()
Bool
Cancel the task - for use in inherited classes
Returns:
If the loader removed it from the queue successfully - false means that there is a 'load finished' event inbound for the task manager
destroy
()
Destroy this load task and don't use after this
done
-
result -
manager
Called from the task manager when a Task is finished
Parameters:
-
resultTypeThe resulting data from the return
-
managerTaskManagerThe reference to the manager
initialize
-
id -
url -
callback -
updateCallback -
priority -
data
Init the laod task
Parameters:
-
idStringThe id of the task
-
urlStringThe url to load
-
callbackFunctionThe callback to call when the load is completed
-
updateCallbackFunctionThe optional callback to get updates (to show load progress)
-
priorityIntThe optional priority, defaults to normal
-
dataThe optional data object, for any loading options that may have been added to the preloader
start
-
callback
Start the load
Parameters:
-
callbackFunctionCallback to call when the load is done
Properties
_isDestroyed
Bool
protected
Bool to keep track if this has been destroyed
data
Loading options
priority
Int
The media loader priorty of the load
