818
Chapter 14: Properties
kerningThreshold
Usage
-- Lingo syntax
memberObjRef.
kerningThreshold
// JavaScript syntax
memberObjRef.
kerningThreshold;
Description
Text cast member property; this setting controls the size at which automatic kerning takes place in
a text cast member. This has an effect only when the kerning property of the text cast member is
set to TRUE.
The setting itself is an integer indicating the font point size at which kerning takes place.
This property defaults to 14 points.
See also
kerning
key
Usage
-- Lingo syntax
_key.key
// JavaScript syntax
_key.key;
Description
Key property; returns the value of the last key that was pressed. Read-only.
The returned value is the American National Standards Institute (ANSI) value that is assigned to
the key, not the numerical value.
You can use
key
in handlers that perform certain actions when the user presses specific keys as
shortcuts and other forms of interactivity. When used in a primary event handler, the actions you
specify are the first to be executed.
Note:
The value of
key
isn’t updated if the user presses a key while Lingo or JavaScript syntax is in
a loop.
Use the sample movie Keyboard Lingo to test which characters correspond to different keys on
different keyboards.
Example
The following statements cause the movie to return to the main menu marker when the user
presses the q key. Because the
keyDownScript
property is set to
checkKey
, the
on prepareMovie
handler makes the
on checkKey
handler the first event handler executed when a key is pressed.
The
on checkKey
handler checks whether the q key is pressed and if it is, navigates to the main
menu marker.
Summary of Contents for DIRECTOR MX 2004
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...