try changing the lines to ... FOR I = 0 TO REC ... VSYNC 1 ... this should check it once every 1/60 of a second for 1 second. The way you have it now, it only checks once, then waits a second, then continues...