Change Flex 4 Flash Color

Is there an easy way to change the background color of a Flex 4 flash without using skins?

UPDATE : ok, it turned out, just set the chromeColor attribute of the chromeColor button.

+6
button flex4 flex-spark
source share
3 answers

For spark components, you can use the chromeColor style:
<s:Button chromeColor="0xff0000" label="chrome red"/>

+6
source share

You can change the color style of the button. You can also have raster padding.

Refresh . The above methods do not change the background.

The easiest way to change the background, you can use the property - opaqueBackground .

Here is another way to change the background of a button without changing its skin - 1. Create a group with a rectangle and a button. 2. Set the opaqueBackground your button to zero. 3. Set the width and height rectangle to 100% 4. No matter what color you fill the rectangle with, this is the background of your button.

+1
source share

This can also be done using code: -

 btnID.addEventListener(MouseEvent.MOUSE_OVER, textChange); btnID.addEventListener(MouseEvent.MOUSE_OUT, textChangeback); private function textChange(event:MouseEvent):void { btnLinkDelete.setStyle("color", 0xFFFFFF) btnLinkDelete.setStyle("chromeColor", 0x535151) } private function textChangeback(event:MouseEvent):void { btnLinkDelete.setStyle("color", 0x000000) btnLinkDelete.setStyle("chromeColor", 0xfcffff) } 

I send it if someone wants to change the background color on hover.

+1
source share

All Articles