Table of Contents

Sound.getVolume( ) Method Flash 5

retrieve the current volume setting
soundObject.getVolume()

Returns

A number indicating the current volume as set by setVolume( ). Usually in the range of 0 (no volume) to 100 (default volume), but it can be higher.

Description

The getVolume( ) method is used to determine the current volume of the sounds controlled by soundObject. Normally, getVolume( ) is used in combination with setVolume( ) to adjust the current volume of a sound.

Example

Here we reduce the volume of a sound by 20:

mySound = new Sound();
mySound.setVolume(mySound.getVolume() - 20);

See Also

Sound.setVolume( )


Table of Contents