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:
-
result
TypeThe resulting data from the return
-
manager
TaskManagerThe reference to the manager
initialize
-
id
-
url
-
callback
-
updateCallback
-
priority
-
data
Init the laod task
Parameters:
-
id
StringThe id of the task
-
url
StringThe url to load
-
callback
FunctionThe callback to call when the load is completed
-
updateCallback
FunctionThe optional callback to get updates (to show load progress)
-
priority
IntThe optional priority, defaults to normal
-
data
The optional data object, for any loading options that may have been added to the preloader
start
-
callback
Start the load
Parameters:
-
callback
FunctionCallback 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