setVolume()
Top  Previous  Next


SWiSH Player Support
SWF5 or later - Not Supported (Use File | Test | Browser/Player)

Syntax
soundObject.setVolume(volume);

Arguments
volume: an integer between 0 (off) and 100 (full volume).

Returns
Nothing.

Description
Method; sets the volume level for the specified Sound object. A setting of 0 turns the sound off, and a setting of 100 plays the sound at full volume (100%).

Sample
onLoad() {
    introSound = new Sound(mySprite);
    introSound.setVolume(75);
}


// sets the volume level of the Sound object "introSound" to 75 percent.