Focusrect (Button._Focusrect Property); Getdepth (Button.getdepth Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

_focusrect (Button._focusrect property)

public _focusrect : Boolean
A Boolean value that specifies whether a button has a yellow rectangle around it when it has
keyboard focus. This property can override the global
property of a button instance is null; meaning, the button instance does not
_focusrect
override the global
_focusrect
set to
or
, it overrides the setting of the global
true
false
button instance.
In Flash Player 4 or 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
Availability: ActionScript 1.0; Flash Player 6
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;
Change the publish settings to Flash Player 6, and test the SWF file in a browser window by
selecting File > Publish Preview > HTML. Give the SWF focus by clicking it in the browser
window, and use the Tab key to focus each instance. You will not be able to execute code for
this button by pressing Enter or the Space key when

getDepth (Button.getDepth method)

public getDepth() : Number
Returns the depth of the button instance.
Each movie clip, button, and text field has a unique depth associated with it that determines
how the object appears in front of or in back of other objects. Objects with higher depths
appear in front.
Availability: ActionScript 1.0; Flash Player 6
property. If the
property on an individual movie clip.
_focusrect
, then keyboard navigation for that button is
false
_focusrect
, and
, and add the following ActionScript to Frame 1
myBtn3_btn
property. By default, the
_focusrect
property of a button instance is
_focusrect
_focusrect
property controls the global
_focusrect
to
.
true
is disabled.
_focusrect
property for the single
Button
357

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents