Difference between revisions of "Legacy:Sound/isPlaying"

From Spherical
Jump to: navigation, search
(Created sound.isPlaying page)
 
(navboxed)
 
(2 intermediate revisions by one other user not shown)
Line 17: Line 17:
 
while (my_music.isPlaying())
 
while (my_music.isPlaying())
 
{
 
{
     font.drawText(0, 0, I"m playing!");
+
     font.drawText(0, 0, "I'm playing!");
 
     FlipScreen();
 
     FlipScreen();
 
}
 
}
Line 24: Line 24:
 
==See also==
 
==See also==
 
* Sphere [[API:Sound|Sound]] object
 
* Sphere [[API:Sound|Sound]] object
* [[API:Sound/play|Sound.play]]()
+
* [[API:Sound/play|Sound.play]](repeat)
 
* [[API:Sound/pause|Sound.pause]]()
 
* [[API:Sound/pause|Sound.pause]]()
 
* [[API:Sound/stop|Sound.stop]]()
 
* [[API:Sound/stop|Sound.stop]]()
Line 34: Line 34:
 
* [[API:IsKeyPressed|IsKeyPressed]]()
 
* [[API:IsKeyPressed|IsKeyPressed]]()
  
[[Category:Functions]]
+
 
 +
{{API:Sound/navbox}}

Latest revision as of 22:40, 30 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


API:Sound/navbox