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).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access