Graphics 800,600 While Not KeyHit(KEY_ESCAPE) 'Escape Cls SetColor 127,0,0 DrawRect 200,200,800,100 Flip Delay 2000 SetColor 200,10,10 DrawRect 0,0,800,100 Delay 2000 Flip Wend End
I have the above piece of code.I want the test program to be exited by pressing escape.I then want the program to:
draw a box
wait 2 seconds
draw another box
wait 2 seconds
more commands...
What seems to be the problem with my code as the second box only flashes briefly and pressing escape only works when the second box flashed on screen? Am I missing something about the sequential flow of control ? Thanks in advance.