Lingo Dictionary > D-F > flushInputEvents

 

flushInputEvents

Syntax

flushInputEvents()

Description

This command will flush any waiting mouse or keyboard events from Director's message queue. Generally this is useful when Lingo is in a tight repeat loop and the author wants to make sure any mouse clicks or keyboard presses don't get through. This command operates at runtime only and has no effect during authoring.

Example

This Lingo disables mouse and keyboard events while a repeat loop executes:

repeat with i = 1 to 10000
	flushInputEvents()
	sprite(1).loc = sprite(1).loc + point(1, 1)
end repeat

mouseDown, mouseUp, keyDown, keyUp