User Guide
keyUpScript 823
• playNext() initiates playback of the next motion in the playlist.
• queue() adds a motion to the end of the playlist.
The
keyframePlayer modifier generates the following events, which are used by handlers
declared in the
registerForEvent() and registerScript() commands. The call to the
declared handler includes three arguments: the event type (either
#animationStarted or
#animationEnded), the name of the motion, and the current time of the motion. For detailed
information about notification events, see the entry for
registerForEvent().
#animationStarted is sent when a motion begins playing. If blending is used between motions,
the event is sent when the transition begins.
#animationEnded is sent when a motion ends. If blending is used between motions, the event is
sent when the transition ends.
See also
addModifier, modifiers, bonesPlayer (modifier), motion
keyUpScript
Usage
the keyUpScript
Description
System property; specifies the Lingo that is executed when a key is released. The Lingo is written
as a string, surrounded by quotation marks, and can be a simple statement or a calling script for
a handler.
When a key is released and the
keyUpScript property is defined, Lingo executes the instructions
specified for the
keyUpScript property first. Unless the instructions include the pass command
so that the
keyUp message can be passed on to other objects in the movie, no other on keyUp
handlers are executed.
When the instructions you’ve specified for the
keyUpScript property are no longer appropriate,
turn them off by using the statement
set the keyUpScript to empty.
Example
The following statement sets keyUpScript to if the key = RETURN then go the frame + 1.
When this statement is in effect, the movie always goes to the next frame whenever the user
presses the Return key.
the keyUpScript = "if the key = RETURN then go to the frame + 1"
The following statement sets keyUpScript to the custom handler myCustomHandler. A Lingo
custom handler must be enclosed in quotation marks when used with the keyUpScript property.
the keyUpScript = "myCustomHandler"
See also
on keyUp