Question

If a MovieClip or Button gets selected with TAB, a yellow border is displayed around it. Is it possible to change the color of the focusRect in AS3 or AIR? If not, what would be an alternative way to highlight a selected button?

Était-ce utile?

La solution

No, you can't. But you can manage focus, and draw whatever you want, or change state of your UI component. It's a good practice for UI components create several states: normal, highlited, selected, disabled and manage them with disabled system focusRect.

myComponent.addEventListener(FocusEvent.FOCUS_IN, onFocusIn);
myComponent.addEventListener(FocusEvent.FOCUS_OUT, onFocusOut);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top