Macromedia flash 8-developing flash lite 2.x applications User Manual
12
Creating Interactivity and Navigation
If your application contains input text fields, Macromedia recommends that you do not
disable the focus rectangle, as it provides the only visual clue that an input text field has focus.
For example, the following image shows an input text field that has the current focus:
disable the focus rectangle, as it provides the only visual clue that an input text field has focus.
For example, the following image shows an input text field that has the current focus:
If your application contains buttons (with defined over states) and input text fields on the
same screen, you can set the
same screen, you can set the
_focusRect
property to
false
in each button’s
on(rollOver)
event handler and set it to
true
in each button’s
on(rollOut)
handler, as shown in the
following code example. This causes the focus rectangle to appear when an input text field has
focus, but not when a button has focus.
focus, but not when a button has focus.
// Attach this code to each button on the Stage.
on(rollOver) {
on(rollOver) {
_focusRect = false;
}
on(rollOut) {
on(rollOut) {
_focusRect = true;
}
For more information about using input text fields, see
Guidelines for using tab navigation
When using tab navigation to create interactivity, you should place at least two objects (input
text fields, buttons, or a combination) on the screen at the same time. If the screen only
contains a single button or input text field, the user can’t change the focus and may feel stuck
in the user interface.
text fields, buttons, or a combination) on the screen at the same time. If the screen only
contains a single button or input text field, the user can’t change the focus and may feel stuck
in the user interface.
If a screen in your application contains only a single button for user interaction, consider
detecting a keypress event rather than using button events. For more information, see
detecting a keypress event rather than using button events. For more information, see
.
Input text field with current focus