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?

Was it helpful?

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);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top