Developing Flash Lite 2.x and 3.0 Applications

Customizing the focus rectangle

The focus rectangle is a default yellow highlight that indicates which button or input text box is currently selected. Movie clips are also included if their tabEnabled property is set to true, or if they have event handlers associated with them and their tabEnabled property is not set to false. For more information, see About the focus rectangle.

You can disable the default focus rectangle behavior by setting the global _focusRect property to false. You can also disable the focus rectangle for specific buttons or movie clips (see _focusrect (Button._focusrect property) and _focusrect (MovieClip._focusrect property)) in the Flash Lite 2.x and 3.0 ActionScript Language Reference.

You can also change the color of the focus rectangle from the default yellow to any other color. To do this you use the SetFocusRectColor command, which takes RGB values as parameters. For example, the following code changes the color of the focus rectangle to red:

fscommand2("SetFocusRectColor", 255, 0, 0);