Class Index | File Index

Classes


Class R.resources.loaders.SoundLoader


Extends R.resources.loaders.RemoteLoader.
Loads sounds and stores the reference to them using the provided sound system. Sounds resource that are loaded are cached with the loader.
Defined in: soundloader.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Fields borrowed from class R.resources.loaders.RemoteLoader:
STATUS_CACHED, STATUS_NOT_FOUND, STATUS_OK, STATUS_SERVER_ERROR
Method Summary
Method Attributes Method Name and Description
 
Destroy the sound loader and shut down the sound system
 
Get the class name of this object
 
Get the specific sound resource by name.
 
The name of the resource this loader will get.
 
getSound(sound)
Creates a R.resources.types.Sound object representing the named sound.
 
load(name, url)
Load a sound resource from a URL.
 
unload(sound)
Unload a sound, calling the proper methods in the sound system.
Methods borrowed from class R.resources.loaders.RemoteLoader:
exists, getPathUrl, setPathUrl
Methods borrowed from class R.resources.loaders.AbstractResourceLoader:
clear, exportAll, get, getCachedObjects, getResources, isReady, release, set, setReady
Methods borrowed from class R.engine.BaseObject:
addEvent, addEvents, getElement, jQ, removeEvent, setElement, triggerEvent, update
Methods borrowed from class R.engine.PooledObject:
clearObjectDataModel, getId, getName, getObjectDataModel, getProperties, isDestroyed, setName, setObjectDataModel, toString, toXML
Class Detail
R.resources.loaders.SoundLoader(soundSystem)
Parameters:
soundSystem
{R.sound.AbstractSoundSystem} A sound system instance, either R.sound.SM2 or R.sound.HTML5.
Method Detail
destroy()
Destroy the sound loader and shut down the sound system

{String} getClassName()
Get the class name of this object
Returns:
{String} The string "R.resources.loaders.SoundLoader"

{R.resources.types.Sound} getResourceObject(name)
Get the specific sound resource by name.
Parameters:
name
{String} The name of the resource
Returns:
{R.resources.types.Sound}

{String} getResourceType()
The name of the resource this loader will get.
Returns:
{String} The string "sound"

{R.resources.types.Sound} getSound(sound)
Creates a R.resources.types.Sound object representing the named sound.
Parameters:
sound
{String} The name of the sound from the resource
Returns:
{R.resources.types.Sound} A R.resources.types.Sound instance

load(name, url)
Load a sound resource from a URL. If the sound system does not initialize, for whatever reason, you can still call the sound's methods.
Parameters:
name
{String} The name of the resource
url
{String} The URL where the resource is located

unload(sound)
Unload a sound, calling the proper methods in the sound system.
Parameters:
sound
{String} The name of the sound to unload

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Mar 18 2013 16:09:20 GMT-0400 (EDT)