The command waitevent() will actualy stop your program executing until a specified time EG waitevent(1000), or an event happens.
So the behaviour you notice is the correct one, where teh mouse causes the event to happen, and thus your program can continue past waitevent().
Do as skidracer suggests, add a timer, and put your canvas update stuff in the $4001 event.
So the behaviour you notice is the correct one, where teh mouse causes the event to happen, and thus your program can continue past waitevent().
Do as skidracer suggests, add a timer, and put your canvas update stuff in the $4001 event.