Legacy:Sound/pause

From Spherical
< Legacy:Sound
Revision as of 21:58, 20 May 2013 by Radnen (talk | contribs) (Created the sound.pause page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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