There are two main ways to play sounds in Lingo. The command

on mouseUp
sound(8).play(member("mySound"))
end


plays the sound named mySound in channel 8 immediately with no audible delay when the sprite is clicked. The sound() command assigns a sound file to play in a virtual channel numbered 1-8. These channels are controlled by Lingo independently of the 2 sound channels in the score. If you want sounds to play completely without being interrupted by successive mouseclicks on other sprites (thereby achieving an overlapping effect), then assign each sound to play in a separate channel. If you want each successive mouseclick to stop the previous sound and play the next sound, then assign all sounds to play in the same channel.

To set the volume of a sound, use the command:

sound(8).volume = [number]

with a number between 0 and 255

the whole script for a sprite mightlook like this:

on mouseUp
sound(8).play(member("mySound"))
sound(8).volume = 80
end

 

the movie above uses commands in the sprite scripts to set three different volume settings