Legacy:Sound/pause

From Spherical
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Play a loaded sound.

Usage

sound.pause();


  • sound Sphere Sound object. The sound to pause.

Examples

Pausing a sound with the enter key:

var my_music = LoadSound("your_sound.ogg");

my_music.play(false);

while (!IsKeyPressed(KEY_ESCAPE))
{
    while (AreKeysLeft()) {
        if (GetKey() == KEY_ENTER) my_music.pause();
    }
}

See also