playSound
Previous  Top  Next

Syntax
playSound(soundname, dontplayifloaded [, volume, loop, fadein, fadeout, effect])

Arguments
soundname: Name of imported sound (string).
dontplayifloaded: Boolean. If true, don't play sound if it is already playing.
volume: Volume to play sound, 0 to 100% (default = 100).
loop:: After sound has played, loop this many times. default = 1, infinite = 0.
fadein: Boolean. If true, fade in over 1st loop. Default = false.
fadeout: Boolean. If true, fade out during last loop. Default = false.
effect: One of the supported Effect constants, 'None', 'Fade In', 'Fade Out', 'Pan left to right', 'Pan right to left', 'Left channel only' or 'Right channel only'. Default = 'None').

Returns
Nothing.

Description
Defines how a sound should be played.

Sample
On Frame 2, play the sound "chatinvt.wav" 5 times at a max volume of 90%.
Fade in on the first loop, fade out on the last loop. Pan from left to right on each loop.

onFrame (2) {
playSound("ChatInvt.wav",true,90,5,true,true,'Pan Left to Right');
}

See Also
playSound(), stopAllSounds()