Class: Resource

Resource

new Resource()

Properties:
Name Type Description
url string url of this resource
state Resource.State current loading state

Members

(static) State

Properties:
Name Type Description
QUEUED int The resource is queued up, waiting to be loaded.
LOADING int The resource is downloading
LOADED int The resource has finished downloaded by is not complete
FINISHED int The resource has completly finished loading and is ready.
FAILED int Downloading the resource has failed.

Methods

progressChanged(bytesReceived, bytesTotal) → {Signal}

Signaled when download progress for this resource has changed
Parameters:
Name Type Description
bytesReceived int bytes downloaded so far
bytesTotal int total number of bytes in the resource
Returns:
Type
Signal

release()

Release this resource

stateChanged(bytesReceived) → {Signal}

Signaled when resource loading state has changed
Parameters:
Name Type Description
bytesReceived Resource.State new state
Returns:
Type
Signal