Difference between revisions of "Legacy:Sound/isPlaying"
From Spherical
(Created sound.isPlaying page) |
m (→Examples: small mistake) |
||
Line 17: | Line 17: | ||
while (my_music.isPlaying()) | while (my_music.isPlaying()) | ||
{ | { | ||
− | font.drawText(0, 0, I | + | font.drawText(0, 0, "I'm playing!"); |
FlipScreen(); | FlipScreen(); | ||
} | } |
Revision as of 21:53, 20 May 2013
Play a loaded sound.
Usage
sound.isPlaying();
- sound Sphere Sound object. The sound to get info from.
Examples
Waiting for a sound to finish:
var font = GetSystemFont();
var my_music = LoadSound("your_sound.ogg");
my_music.play(false);
while (my_music.isPlaying())
{
font.drawText(0, 0, "I'm playing!");
FlipScreen();
}
See also
- Sphere Sound object
- Sound.play()
- Sound.pause()
- Sound.stop()
- AreKeysLeft()
- FlipScreen()
- Font.drawText()
- Font.getHeight()
- GetSystemFont()
- IsKeyPressed()