Difference between revisions of "Sound.IsPlaying"

From Xojo Documentation

m
m
 
Line 9: Line 9:
 
{{Description
 
{{Description
 
|text = Returns [[True]] if the sound is playing. }}
 
|text = Returns [[True]] if the sound is playing. }}
 
  
 
==Example==
 
==Example==
Line 16: Line 15:
  
 
<rbcode>
 
<rbcode>
  if chimes.IsPlaying then
+
If chimes.IsPlaying Then
    chimes.stop
+
  chimes.Stop
  end if
+
End If
 
</rbcode>
 
</rbcode>

Latest revision as of 14:37, 8 August 2017

Method

Sound.IsPlaying() As Boolean

Supported for all project types and targets.

Returns True if the sound is playing.

Example

This example stops a sound that was played using PlayLooping. It checks to see if the sound is still playing.

If chimes.IsPlaying Then
chimes.Stop
End If