As you can see in the picture, I put two button when the button sos is active, state is equal to 1 , and when I press the power button, the first condition is established, and when press the power button again , I want to make a second condition. The first condition is immediately discontinued. Is this clear?
https://pasteboard.co/HBzxtJb.png
B4X:
If FlashMode.ToUpperCase = "OFF" Then
Do While(state = 1)
btn.Background = bmp1
For i1 = 0 To 2
flash.FlashOn
Sleep(2000)
flash.FlashOff
Sleep(500)
Next
For i2 = 0 To 2
flash.FlashOn
Sleep(500)
flash.FlashOff
Sleep(500)
Next
Sleep(1000)
Loop
Else
flash.FlashOff
btn.Background = bmp2
End If
Last edited: