Name
_focusrect Global Property — the highlight state used for buttonsactivated via the keyboard
Availability
Flash 4 and later
Synopsis
_focusrect
Access
Read/write
Description
When the mouse hovers over a button in Flash, the content of the
button’s Over state is displayed. Buttons can also gain
keyboard focus when the user presses the Tab key. When a button has
keyboard focus, Flash places a yellow rectangle over that button,
which is not always aesthetically desirable. You can turn off the
yellow highlight rectangle using the _focusrect
global property, like so:
_focusrect = false;
When _focusrect
is set to
false
, Flash displays the Over state of
keyboard-focused buttons. When _focusrect
is set
to true
(its default), Flash displays the yellow
rectangle.
Usage
Though _focusrect
is used in a Boolean sense, it
actually stores a number, not a Boolean. Although there’s
rarely a reason to do so, if we examine the value of
_focusrect
, it returns either 1 (indicating
true
) or
(indicating false
).
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.