AddText "Hit SPACE to play/stop a music"
playing=OFF
Repeat
'user controls
If KeyHit(cbkeyspace) Then
playing=Not playing
If playing Then
music=PlaySound("Media\SK_Battle2.mp3")
Else
StopSound music
EndIf
EndIf
'print a funny text
If SoundPlaying(music) Then
Text 40,40,"Music is playing :)"
Else
Text 40,40,"Music is not playing :("
playing=OFF
EndIf
DrawScreen
Until EscapeKey()
|
|