Chapter 3
154
Example
This example determines whether a character passed to it is a digit:
on isNumber aLetter
digits = "1234567890"
if digits contains aLetter then
return TRUE
else
return FALSE
end if
end
Note:
The string comparison is not sensitive to case or diacritical marks; “a” and Å are treated the same.
See also
offset() (string function)
,
starts
continue
This Lingo is obsolete. Use
go to the frame +1
.
controlDown
Syntax
the controlDown
Description
Function; determines whether the Control key is being pressed (
TRUE
) or not (
FALSE
).
You can use the
controlDown
function together with
the key
to check for combinations of the
Control key and another key.
For a movie playing back with the Director player for Java, this function returns
TRUE
only if a
second key is pressed simultaneously with the Control key. If the Control key is pressed by itself,
controlDown
returns
FALSE
. The Director player for Java supports key combinations with the
Control key. However, the browser receives the keys before the movie and thus responds to and
intercepts any key combinations that are also browser keyboard shortcuts.
For a demonstration of modifier keys and Lingo, see the sample movie Keyboard Lingo in
Director Help.
Example
This
on keyDown
handler checks whether the pressed key is the Control key, and if it is, the
handler activates the
on doControlKey
handler. The argument
(the key)
identifies which key
was pressed in addition to the Control key.
on keyDown
if (the controlDown)then doControlKey (the key)
end
See also
charToNum()
,
commandDown
,
key()
,
keyCode()
,
optionDown
,
shiftDown
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...