Play()

Syntax:

Play( Times, Volume, Start, Finish, FadeIn, FadeOut, Stop, Wait )

Parameters:

Times – The number of times to play the sound. To play the sound continuously enter -1, otherwise enter a positive number. This parameter is optional. The default value is 1.

Volume – The percentage volume at which to play the sound. Volume must be a number between 0 and 100. This parameter is optional. The default value is 100.

Start – The start position, relative to the beginning of the sound, in seconds from which to play the sound. Start must be a positive number. This parameter is optional. The default is 0, which is the beginning of the sound.

Finish – The finish position, relative to the beginning of the sound, in seconds from which to finish the sound, or -1 to indicate the end of the sound. This parameter is optional. The default is -1.

FadeIn – a length in seconds in which to fade in the sound from the beginning. FadeIn must be a positive number. This parameter is optional. The default value is 0 i.e. no fade in.

FadeOut – a length in seconds in which to fade out the sound from the end. FadeOut must be a positive number. This parameter is optional. The default value is 0 i.e. no fade out.

Stop – Sets if the sound should stop when the page changes to another page. Stop can either be true or false. If Stop is true, the page will stop when the page changes. If Stop is false, the sound will continue when the page changes. This parameter is optional. The default is true.

Wait – Wait for this script command to complete before moving to the next script command, or not to wait. Wait is either true or false. If Wait is true, the script pauses until this animation is completed before continuing to the next line of the script. If Wait is false, the script will process the next line of script immediately. This parameter is optional. The default value is true.

Remarks:

This function will play a specified sound with the optional parameter settings. This function can play wav, midi, mp3 and other sound formats. It needs to be used in conjunction with an OpenSound command which assigns a sound file to a variable.

image\Script_Button.jpgExamples