Code archives/Miscellaneous/Simple Blinking Technique
This code has been declared by its author to be Public Domain code.
Download source code
| This code is if you ever want to have text or images blink on the screen. You need to adjust the numbers 2000 and 2200 for the effect. The second number should always be higher than the first. NOTE: You need to draw something to the screen or whatever. If you copy and paste the code as is below, then you won't see the effect. The program has waste time doing something else too. The code have the text blink |
graphics 800,600,16,2 global looptime SetBuffer BackBuffer() looptime = Millisecs() While Not KeyDown(1) ;places text on the screen If MilliSecs() < (looptime+2000) Text 342,480,"Press Space" Else ;takes the text off the screen and resets looptime to start it all over again If MilliSecs() > (looptime+2700) Then looptime = MilliSecs() EndIf Flip Wend |
Comments
None.
Code Archives Forum