public _focusrect : Boolean
A Boolean value that specifies whether a movie clip has a yellow rectangle around it when it has input focus. This property can override the global _focusrect property. The default value of the _focusrect property of a movie clip instance is null; the movie clip instance does not override the global _focusrect property. If the _focusrect property of a movie clip instance is set to true or false, it overrides the setting of the global _focusrect property for the single movie clip instance.
Note: For Flash Lite 2.0, when the _focusrect property is disabled (in other words, MovieClip._focusrect is set to false), the movie clip still receives all key press and mouse events.
Also for Flash Lite 2.0, you can change the color of the focus rectangle using the fscommand2 SetFocusRectColor command. This behavior is different from Flash Player, for which the color of the focus rectangle is restricted to yellow.
This example demonstrates how to hide the yellow rectangle around a specified movie clip instance in a SWF file when the instance has focus in a browser window. Create three movie clips called mc1_mc, mc2_mc, and mc3_mc, and add the following ActionScript to Frame 1 of the Timeline:
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);
}
To test the SWF file in a browser window, select File > Publish Preview > HTML. To give the SWF focus, click it in the browser window and press Tab to focus each instance. You cannot execute code for this movie clip in the browser by pressing Enter or the Spacebar when _focusrect is disabled.
You can also test your SWF file in the test environment. Select Control > Disable Keyboard Shortcuts in the test environment. This allows you to view the focus rectangle around the instances in the SWF file.
_focusrect property, _focusrect (Button._focusrect property)