User Guide
532 Chapter 7: ActionScript for Flash
_focusrect
Availability
Flash Player 4.
Usage
_focusrect = Boolean;
Description
Property (global); specifies whether a yellow rectangle appears around the button or movie clip
that has keyboard focus. If
_focusrect is set to its default value of true, then a yellow rectangle
appears around the currently focused button or movie clip as the user presses the Tab key to
navigate through objects in a SWF file. Specify
false if you do not want to show the yellow
rectangle. This is a global property that can be overridden for specific instances.
Note: If you use a component, then FocusManager overrides Flash Player’s focus handling, including
use of this global property.
Example
The following example demonstrates how to hide the yellow rectangle around any instances in a
SWF file when they have focus in a browser window. Create some buttons or movie clips and add
the following ActionScript:
_focusrect = false;
Change the publish settings to Flash Player 6, and test the SWF file in a browser window. Give
the SWF focus by clicking it in the browser window, and use the Tab key to focus each instance.
Pressing Enter or the Space key when
_focusrect is disabled does not invoke the onRelease
event handler as it does when
_focusrect is enabled or true.
See also
MovieClip._focusrect
CHAPTER 7
ActionScript for Flash