Table of Contents

Button._focusrect Property Flash 6

Boolean; enables or disables automatic highlighting of buttons activated via the keyboard read/write
theButton._focusrect

Description

When the mouse pointer hovers over a Flash button, 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 displays the button's Over state and also places a yellow rectangle around the button, which is not always aesthetically desirable. You can turn off the yellow rectangle for an individual button by setting its _focusrect property to false:

go_btn._focusrect = false;

When _focusrect is set to false, Flash displays only the Over state of keyboard-focused buttons. When _focusrect is set to true, Flash displays the Over state and the yellow rectangle. When it is null (the default), the value of the global _focusrect property is used. To disable the yellow focus rectangle for all buttons in a movie, set the global _focusrect property to false. Note that the value of the global _focusrect property is not reflected by the _focusrect property of individual button instances. Furthermore, setting an individual button's _focusrect property overrides the global setting for that button.

Usage

The Tab key does not work reliably in Test Movie mode unless Control figs/U2192.gif Disable Keyboard Shortcuts is enabled. Be sure to test keyboard behavior in the Standalone Player, if applicable, and in the Flash Player for all targeted web browsers.

See Also

_focusrect, MovieClip_.focusrect


Table of Contents