playSound

playSound(waveFileName: String);

The playSound method of the Application class plays the .wav file specified in the waveFileName parameter and returns when the complete sound file has been played. (The app.playSoundAsync method starts playing the specified .wav file and returns immediately.) In JADE thin client mode, this method always executes on the presentation client.

The waveFileName parameter must include the full path and file name, as shown in the code fragment in the following example.

app.playSound("s:\jademedia\arlo.wav");

This method does not raise an exception if the sound cannot be played or if the specified file is invalid, so that code can function silently on a workstation without a sound card.

See also the Sound class play method, which transfers a sound wave image from the receiver object to memory and then creates a thread to play the sound.