MovieClip._focusrect
Availability
Flash Player 6.
Usage
my_mc._focusrect:Boolean
Description
Property; a Boolean value that specifies whether a movie clip has a yellow rectangle around it
when it has keyboard focus. This property can override the global
default value of the
clip instance does not override the global
clip instance is set to
for the single movie clip 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 later
_focusrect
to permit the customization of
Example
This example demonstrates how to hide the yellow rectangle around a specified movie clip
instance in a SWF file when it has focus in a browser window. Create three movie clips called
,
mc1_mc
mc2_mc
mc1_mc._focusrect = true;
mc2_mc._focusrect = false;
mc3_mc._focusrect = true;
mc1_mc.onRelease = traceOnRelease;
mc3_mc.onRelease = traceOnRelease;
function traceOnRelease() {
trace(this._name);
}
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 press Tab to focus each instance. You will
not be able to execute code for this movie clip in the browser by pressing Enter or the Spacebar
when
_focusrect
Additionally, you can test your SWF file in the test environment. Select Control > Disable
Keyboard Shortcuts from the main menu in the test environment. This allows you to view the
focus rectangle around the instances in the SWF file.
See Also
Button._focusrect,
property of a movie clip instance is
_focusrect
or
, it overrides the setting of the global
true
false
_focusrect
, and
, and add the following ActionScript in Frame 1 of the Timeline:
mc3_mc
is disabled.
_focusrect
property. If the
_focusrect
property controls the global
_focusrect
on an individual movie clip basis.
property. The
_focusrect
; meaning, the movie
null
of a movie
_focusrect
property
_focusrect
MovieClip._focusrect
515
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?