Example
This statement tests whether 3.0 is a floating-point number. The Message window displays the
number 1, indicating that the statement is
put (3.0).floatP
-- 1
This statement tests whether 3 is a floating-point number. The Message window displays the
number 0, indicating that the statement is
put (3).floatP
-- 0
See also
float(), ilk(), integerP(), objectP(), stringP(),
flushInputEvents()
Usage
-- Lingo syntax
_player.flushInputEvents()
// JavaScript syntax
_player.flushInputEvents();
Description
Player method; flushes any waiting mouse or keyboard events from the Director message queue.
Generally this is useful when script is in a tight loop and the author wants to make sure any
mouse clicks or keyboard presses don't get through.
This method operates at runtime only and has no effect during authoring.
Parameters
None.
Example
This statement disables mouse and keyboard events while a repeat loop executes:
-- Lingo syntax
repeat with i = 1 to 10000
_player.flushInputEvents()
sprite(1).loc = sprite(1).loc + point(1, 1)
end repeat
// JavaScript syntax
for (var i = 1; i <= 10000; i++) {
_player.flushInputEvents();
sprite(1).loc = sprite(1).loc + point(1, 1);
}
See also
on
keyDown,
on
Player
318
Chapter 12: Methods
keyUp,
on mouseDown (event
.
TRUE
.
FALSE
symbolP()
handler),
on mouseUp (event
handler),
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers