OpenSound()

Syntax:

OpenSound( filename, channel )

Parameters:

filename – The filename of the sound to play. Filename should be the full pathname of the sound file or the alias name given to the sound object in the Additional Resources tab of the page or Publication Properties dialog. This parameter is required.

Note:
Pathnames normally contain backslashes e.g. c:\song.wav, all single backslashes should be entered as double backslashes i.e. c:\\song.wav.

channel – The number of the channel on which to play the sound. Channel should be a positive number. This parameter is optional. The default is ‘any’ i.e. any channel can play the sound.

Return:

A Sound object set to the given filename. It can be controlled using its Play, Stop, GetPosition, SetPosition and Seek functions.

Remarks:

This function will open a sound file but not play it. This function can open wave, midi, mp3 and other sound formats.

image\Script_Button.jpgExamples