User Guide

229
fadeIn()
Syntax
sound(channelNum).fadeIn({milliseconds})
fadeIn(sound(channelNum) {, milliseconds })
Description
This function immediately sets the volume of sound channel channelNum to zero and then brings
it back to the current volume over the given number of milliseconds. The default is 1000
milliseconds (1 second) value is given.
The current pan setting is retained for the entire fade.
Example
This Lingo fades in sound channel 3 over a period of 3 seconds from the beginning of cast
member introMusic2:
sound(3).play(member("introMusic2"))
sound(3).fadeIn(3000)
See also
fadeOut(), fadeTo(), pan (sound property), volume (sound channel)
fadeOut()
Syntax
sound(channelNum).fadeOut({milliseconds})
fadeOut(sound(channelNum) {, milliseconds })
Description
This function gradually reduces the volume of sound channel channelNum to zero over the given
number of milliseconds, or 1000 milliseconds (1 second) if no value is given.
The current pan setting is retained for the entire fade.
Example
This statement fades out sound channel 3 over a period of 5 seconds:
sound(3).fadeOut(5000)
See also
fadeIn(), fadeTo(), pan (sound property), volume (sound channel)
fadeTo()
Syntax
sound(channelNum).fadeTo(volume {, milliseconds })
fadeTo(sound(channelNum), volume {, milliseconds })
Description
This function gradually changes the volume of sound channel channelNum to the specified
volume over the given number of milliseconds, or 1000 milliseconds (1 second) if no value is
given. The range of values for volume is 0-255.
The current pan setting is retained for the entire fade.