ResourceObject

Description

Information about a cached resource. Created by AnimationCache.prefetch, ModelCache.prefetch, SoundCache.prefetch, or TextureCache.prefetch.

Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts • Server Entity Scripts • Assignment Client Scripts

Constructor
new ResourceObject( )

Properties

Name Type Summary
url string URL of the resource. Read-only.
state Resource.State Current loading state. Read-only.

Methods

Name Return Value Summary
release None Releases the resource.

Signals

Name Summary
progressChanged Triggered when the resource's download progress changes.
stateChanged Triggered when the resource's loading state changes.

Method Details

release( )

Releases the resource.

Signal Details

progressChanged( bytesReceived, bytesTotal )
Returns: Signal

Triggered when the resource's download progress changes.

Parameters

Name Type Description
bytesReceived number Bytes downloaded so far.
bytesTotal number Total number of bytes in the resource.
stateChanged( state )
Returns: Signal

Triggered when the resource's loading state changes.

Parameters

Name Type Description
state Resource.State New state.