how do i mute all audio sound?

var muted = false; function OnMouseDown(){

if(muted == false){ audio.volume = 0; muted = true;

} else if (muted == true){ audio.volume = audio.maxVolume; muted = false;

}

}

i Added the script above to an object "music" on my main menu but it jus mute the audio that is attach to it. how do i mute the rest of the audio which is attach to other objects?

   AudioListener.pause = true;

  AudioListener.volume = 0;

try this

http://unity3d.com/support/documentation/ScriptReference/AudioListener-pause.html

thanks it is useful , thanks again

for JS

//Sound Mute button
if(GUI.Button(Rect(55, 200, 180, 40), "Audio Mute")) {
   
    AudioListener.volume = 1 - AudioListener.volume;
   
}