User Guide

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.