need some sound help

Blitz3D Forums/Blitz3D Beginners Area/need some sound help

this plays a sound every two seconds

Graphics 800,600
Global YourSound = LoadSound("YOUR SOUND HERE")
Global SoundPlayed = False
Global Timer# = 0
While Not KeyHit(1)
	Text 400,300,"playing a sound"	
	If SoundPlayed = False Then
		PlaySound YourSound	
		SoundPlayed = True
		Timer# = MilliSecs()			
	EndIf
	If Timer# + 2000 < MilliSecs() Then SoundPlayed = False	
Flip	
Wend
FreeSound YourSound
End