Pardon the mess, Play My Code is in beta!

READY TO PLAY?
CLICK TO LOG IN!

sign up - lost password

getVolume

getVolume()

Returns the current global volume level. This is a value from between 0.0 and 1.0. The default is 0.75.

This volume affects all Sound objects, and can be altered using setVolume.

volume = getVolume()

// half the current volume
setVolume( volume / 2 )

See Also