tags:

views:

19

answers:

1

Hi,

I would like to know if there is a way to add states to a button in flex 4 in addition to the default states that are present. I am unable to find any material on this. Kindly guide me to an appropriate resource.

A: 

You can add something like: [SkinState("myNewState")]; to a component which extends from Spark Button.

You can also make your own ButtonSkin add states there as well: <s:states> <s:State name="normal"/> <s:State name="disabled"/> </s:states>

I've used it to extend a TextInput but I assume it's the same for a Button :)

hering