Pardon the mess, Play My Code is in beta!

READY TO PLAY?
CLICK TO LOG IN!

sign up - lost password

Sound Class

The Sound class is for using any of the audio files you have uploaded using the Asset Manager.

Sounds will only ever be in one of three states, these are: stopped, paused or playing. You can move it into one of these states by calling the appropriate method, and can check if it is in that state by calling 'isPlaying', 'isStopped' and 'isPaused'.

Note that you must always 'free' a sound when it is no longer used. Once free'd, a sound should never be used again.

In the unlikely event sound fails to be supported, the sound class will silently work as accurately as possible. This includes the states switching, repeating and onstop commands running.

new

play

pause

stop

clone

free

seek

onFinish

setRepeating

setVolume

getVolume

getDuration

getDurationLeft

getPosition

getPercentPlayed

getName

isPlaying

isPaused

isStopped

isRepeating