Focusrect (Button._Focusrect Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

_focusrect (Button._focusrect property)

public _focusrect :
A Boolean value that specifies whether a button has a yellow rectangle around it when it has
input focus. This property can override the global
property of a button instance is null; the button instance does not override the
_focusrect
global
property. If the
_focusrect
, it overrides the setting of the global
false
instance.
In Flash Player 4 and Flash Player 5 SWF files, the
property. It is a Boolean value. This behavior was changed in Flash Player 6 and
_focusrect
later to permit customizing the
If the
property is set to
_focusrect
limited to the Tab key. All other keys, including the Enter and arrow keys, are ignored. To
restore full keyboard navigation, you must set
Note: For the Flash Lite 2.0 player, when the
words,
Button.focusRect is false
different from Flash Player behavior because when the
button receives the
rollOver
events.
release
Also for Flash Lite 2.0, you can change the color of the focus rectangle using the fscommand2
SetFocusRectColor
the color of the focus rectangle is restricted to yellow.
Availability: ActionScript 1.0; Flash Lite 2.0
Example
This example demonstrates how to hide the yellow rectangle around a specified button
instance in a SWF file when it has focus in a browser window. Create three buttons called
,
myBtn1_btn
myBtn2_btn
of the Timeline:
myBtn2_btn._focusrect = false;
Make sure that you disable keyboard shortcuts when you test the SWF file by selecting
Control > Disable Keyboard Shortcuts in the test environment.
When
is disabled, you cannot execute code for this button by pressing Enter or
_focusrect
the Spacebar.
276
ActionScript classes
Boolean
_focusrect
_focusrect
false
), the button receives all events. This behavior is
and
rollOut
command. This behavior is also different from Flash Player, for which
, and
myBtn3_btn
property. By default, the
_focusrect
property of a button instance is set to
property for the single button
_focusrect
_focusrect
property on an individual movie clip.
, then keyboard navigation for that button is
to
_focusrect
true
property is disabled (in other
_focusrect
_focusrect
events but does not receive the
, and add the following ActionScript to Frame 1
property controls the global
.
property is disabled, the
and
press
or
true

Advertisement

Table of Contents
loading

Table of Contents