Class createjs.Loader.Item
Defined in: loader.js.
Constructor Attributes | Constructor Name and Description |
---|---|
A class that represents an item to be loaded by the createjs.Loader object.
|
Field Attributes | Field Name and Description |
---|---|
The ID used by CreateJS to identify this item.
|
|
The raw response from a server if this item refers to a binary file.
|
|
The loaded data.
|
|
The raw response from a server if this item refers to a text file.
|
Method Attributes | Method Name and Description |
---|---|
Exports values to an Object.
|
|
Returns the extension of this item.
|
|
Returns the listener attached to this item.
|
|
Returns the method name.
|
|
Retrieves the source path.
|
|
importValues(values)
Imports values from an Object.
|
|
initializeItem(values, basePath)
Initializes this item.
|
|
isBinary()
Returns whether this item is a binary file.
|
|
isCSS()
Returns whether this item is a CSS file.
|
|
isImage()
Returns whether this item is an image file.
|
|
isJSON()
Returns whether this item is a JSON file.
|
|
Returns whether this item is a manifest file.
|
|
isPng()
Returns whether this item is a PNG image.
|
|
isScript()
Returns whether this item is a script file.
|
|
isSound()
Returns whether this item is an audio file.
|
|
Returns whether a listener can handle this item synchronously.
|
|
isText()
Returns whether this item is a text file.
|
|
isVideo()
Returns whether this item is a video clip.
|
|
<static> |
createjs.Loader.Item.Listener()
An interface that listens events from a createjs.Loader.Item object.
|
setListener(listener)
Attaches a listener to this item.
|
|
setSource(source)
Sets the source path.
|
Class Detail
createjs.Loader.Item()
A class that represents an item to be loaded by the createjs.Loader object.
Field Detail
id
The ID used by CreateJS to identify this item.
resultBuffer
The raw response from a server if this item refers to a binary file.
resultObject
The loaded data.
resultText
The raw response from a server if this item refers to a text file.
Method Detail
{Object}
exportValues()
Exports values to an Object.
- Returns:
- {Object}
{number}
getExtension()
Returns the extension of this item.
- Returns:
- {number}
{createjs.Loader.Item.Listener}
getListener()
Returns the listener attached to this item.
- Returns:
- {createjs.Loader.Item.Listener}
{string}
getMethod()
Returns the method name.
- Returns:
- {string}
{string}
getSource()
Retrieves the source path.
- Returns:
- {string}
importValues(values)
Imports values from an Object.
- Parameters:
- {Object} values
initializeItem(values, basePath)
Initializes this item. This method initializes internal variables used in
loading this item.
- Parameters:
- {Object} values
- {string} basePath
{boolean}
isBinary()
Returns whether this item is a binary file.
- Returns:
- {boolean}
{boolean}
isCSS()
Returns whether this item is a CSS file.
- Returns:
- {boolean}
{boolean}
isImage()
Returns whether this item is an image file.
- Returns:
- {boolean}
{boolean}
isJSON()
Returns whether this item is a JSON file.
- Returns:
- {boolean}
{boolean}
isManifest()
Returns whether this item is a manifest file.
- Returns:
- {boolean}
{boolean}
isPng()
Returns whether this item is a PNG image.
- Returns:
- {boolean}
{boolean}
isScript()
Returns whether this item is a script file.
- Returns:
- {boolean}
{boolean}
isSound()
Returns whether this item is an audio file.
- Returns:
- {boolean}
{boolean}
isSynchronous()
Returns whether a listener can handle this item synchronously. The
createjs.Loader class waits for a listener to handle this item if this
function returns true.
- Returns:
- {boolean}
{boolean}
isText()
Returns whether this item is a text file.
- Returns:
- {boolean}
{boolean}
isVideo()
Returns whether this item is a video clip.
- Returns:
- {boolean}
<static>
createjs.Loader.Item.Listener()
An interface that listens events from a createjs.Loader.Item object. This
interface allows to add a custom task after the createjs.Loader.Item class
finishes loading data. (In fact, the createjs.Sound class uses this interface
to decode sound data after the createjs.Loader.Item class finishes loading a
sound file.)
setListener(listener)
Attaches a listener to this item.
- Parameters:
- {createjs.Loader.Item.Listener} listener
setSource(source)
Sets the source path.
- Parameters:
- {string} source