SWiSH Player Support
SWF4 or later - Supported Internally
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 = 0 (loop audio file one time).
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').
Note: Setting the loop value to "1" or "0" will play the sound through one time. Due to a limitation in the Flash player, there is no infinite loop setting. 65535 is the largest number you can have for the loop value and negative loop values will play the sound once.
Note: All of the parameters to the playSound/stopSound must be constant values (either quotes strings, numbers or true/false). You cannot use variables.
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()