
Button._height Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
462
|
ActionScript Language Reference
Button._height Property
height of the button, in pixels
Flash 6
read/write
theButton._height
Description
The floating-point _height property is a nonnegative number specifying the height of
theButton’s current frame (Up, Over, Down), in pixels. It can be both retrieved and set (the
latter action changes the button’s size on screen). In all other respects, it behaves identi-
cally to
MovieClip._height; see that property entry under the MovieClip class for details.
See Also
Button._width, MovieClip._height
Button keyPress Event Handler
occurs when the specified key is pressed
Flash 4
on (keyPress key) {
statements
}
Description
The keyPress event is triggered by the pressing of a specified key. It uses the Flash 5–style
on(
eventName) syntax and is not available in the more modern callback-function form. In
Flash 6, Key.onKeyUp() and Key.onKeyDown() are the preferred keyboard-handling tools,
because they do not require an on-stage object and support the detection of multiple simul-
taneous key presses.
To trap key events, we specify the key that triggers the event, using the syntax listed at the
beginning of this entry, where
key is a string representing the key associated with the event.
The string can be either the character corresponding ...