Moai SDK  2.0
MOAIUntzSound Class Reference
+ Inheritance diagram for MOAIUntzSound:

Function List

getLength
 
getPosition
 
getVolume
 
getFilename
 
isLooping
 
isPaused
 
isPlaying
 
load
 
moveVolume
 
pause
 
play
 
seekVolume
 
setLooping
 
setLoopPoints
 
setPosition
 
setVolume
 
stop
 
- Function List inherited from MOAINode
clearAttrLink
 
clearNodeLink
 
forceUpdate
 
getAttr
 
getAttrLink
 
getNodeState
 
moveAttr
 
scheduleUpdate
 
seekAttr
 
setAttrLink
 
setAttr
 
setNodeLink
 
- Function List inherited from MOAIInstanceEventSource
getListener
 
setListener
 

Detailed Description

Attributes
MOAIUntzSound.ATTR_VOLUME

Function Documentation

getFilename

Return the file name of the sound.


function getFilename ( MOAIUntzSound self )

Parameters
MOAIUntzSoundself
Returns
string filename
getLength

Return the duration of the sound.


function getLength ( MOAIUntzSound self )

Parameters
MOAIUntzSoundself
Returns
number length
getPosition

Return the position of the cursor in the sound.


function getPosition ( MOAIUntzSound self )

Parameters
MOAIUntzSoundself
Returns
number position
getVolume

Return the volume of the sound.


function getVolume ( MOAIUntzSound self )

Parameters
MOAIUntzSoundself
Returns
number volume
isLooping

Return the looping status if the sound.


function isLooping ( MOAIUntzSound self )

Parameters
MOAIUntzSoundself
Returns
boolean looping
isPaused

Return the pause status of the sound.


function isPaused ( MOAIUntzSound self )

Parameters
MOAIUntzSoundself
Returns
boolean paused
isPlaying

Return the playing status of the sound.


function isPlaying ( MOAIUntzSound self )

Parameters
MOAIUntzSoundself
Returns
boolean playing
load

Loads a sound from disk.


function load ( MOAIUntzSound self, string filename )

Parameters
MOAIUntzSoundself
stringfilename
Returns
nil
moveVolume

Animation helper for volume attribute,.


function moveVolume ( MOAITransform self, number vDelta, number length [, number mode ] )

Parameters
MOAITransformself
numbervDelta Delta to be added to v.
numberlength Length of animation in seconds.
numbermode Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns
MOAIEaseDriver easeDriver
pause

Pause the sound.


function pause ( MOAIUntzSound self )

Parameters
MOAIUntzSoundself
Returns
nil
play

Play the sound.


function play ( MOAIUntzSound self )

Parameters
MOAIUntzSoundself
Returns
nil
seekVolume

Animation helper for volume attribute,.


function seekVolume ( MOAITransform self, number vGoal, number length [, number mode ] )

Parameters
MOAITransformself
numbervGoal Desired resulting value for v.
numberlength Length of animation in seconds.
numbermode Optional. The ease mode. One of MOAIEaseType.EASE_IN, MOAIEaseType.EASE_OUT, MOAIEaseType.FLAT MOAIEaseType.LINEAR, MOAIEaseType.SMOOTH, MOAIEaseType.SOFT_EASE_IN, MOAIEaseType.SOFT_EASE_OUT, MOAIEaseType.SOFT_SMOOTH. Defaults to MOAIEaseType.SMOOTH.
Returns
MOAIEaseDriver easeDriver
setLooping

Set or clear the looping status of the sound.


function setLooping ( MOAIUntzSound self [, boolean looping ] )

Parameters
MOAIUntzSoundself
booleanlooping Optional. Default value is 'false.'
Returns
nil
setLoopPoints

Sets the start and end looping positions for the sound.


function setLoopPoints ( MOAIUntzSound self, double startTime, double endTime )

Parameters
MOAIUntzSoundself
doublestartTime
doubleendTime
Returns
nil
setPosition

Sets the position of the sound cursor.


function setPosition ( MOAIUntzSound self [, boolean position ] )

Parameters
MOAIUntzSoundself
booleanposition Optional. Default value is 0.
Returns
nil
setVolume

Sets the volume of the sound.


function setVolume ( MOAIUntzSound self [, boolean volume ] )

Parameters
MOAIUntzSoundself
booleanvolume Optional. Default value is 0.
Returns
nil
stop

Stops the sound from playing.


function stop ( MOAIUntzSound self )

Parameters
MOAIUntzSoundself
Returns
nil