My goal is to remove all hover feedback from the UI. The motivation is for testing touch interface prototypes and not wanting users to have the queue of interactivity when the mouse hovers which they won't have with a touch interface.
I have a partial solution but it has two problems:
Flickers on hover.
protected function ui_suppressHover(event:MouseEvent):void
{
var b = event.currentTarget as UIComponent;
b.skin.currentState = "up";
}
<s:Button x="118" y="60" label="Change em" click="button1_clickHandler(event)" rollOver="button1_rollOverHandler(event)" mouseOver="ui_suppressHover(event)"/>
Here's a partial solution spurred by Maxim's answer. You can make a HoverlessButton class by extending Button and overriding as so:
override protected function getCurrentSkinState():String
{
var state:String = super.getCurrentSkinState();
if (state == "over")
state = "up";
return state;
}
You have to call the super impl first because it's the only one that can check properly for isDown(), which is private.