method playSound

void playSound(scene scene,string file);

Argumente

Zurückgegebener Wert

The method plays a sound specified by the given file. The file (aFile) can be an absolute path (file://), box URL (box://), or relative path to the file. This method plays .wav format files. The aFile parameter can also be one of the following values to play built-in system sounds:
function onPlaySound()
{
    if (scene)
    {
        // Playing a wave file.
        appUtils.playSound(scene, "../content/sound/sound1.wav");

        // Playing a wave file (relative path).
        appUtils.playSound(scene, "sound1.wav");

        // Playing a system sound.
        appUtils.playSound(scene, "sysSoundDefault");
    }
}