
Button 1 Text B 1 

Key Up Gosub Increment
Key Down Gosub Decrement

Controls OpenTextBox

v1 = 5
Gosub SetFlashingSpeed


Stop

Label SetFlashingSpeed
	Select v1
		Case 1
			Button 1 Color Flashing1 Blue Yellow
		Case 2
			Button 1 Color Flashing2 Blue Yellow
		Case 3
			Button 1 Color Flashing3 Blue Yellow
		Case 4
			Button 1 Color Flashing4 Blue Yellow
		Case 5
			Button 1 Color Flashing5 Blue Yellow
		Case 6
			Button 1 Color Flashing6 Blue Yellow
		Case 7
			Button 1 Color Flashing7 Blue Yellow
		Case 8
			Button 1 Color Flashing8 Blue Yellow
		Case 9
			Button 1 Color Flashing9 Blue Yellow
	EndSelect
	'Controls ClearTextBox
	s1 = CLS + CRLF + "Press UP DOWN arrows to change speed"
	s1 = s1 + CRLF + CRLF + "Flashing speed = " + v1
	Print s1
Return

Label Increment
	v1 = v1 + 1
	If v1 > 9
		v1 = 9
	EndIf
	Gosub SetFlashingSpeed
Return

Label Decrement
	v1 = v1 - 1
	If v1 < 0
		v1 = 0
	EndIf
	Gosub SetFlashingSpeed
Return

Label EventStop
	Controls CloseTextBox
End


'WATCH v1
'WATCH s1
'WATCH Now
'WATCH Print Now
'WATCH Now
