2

If I had a button in Flex3

<mx:Button label="Testing" cornerradius='5'/>

And I want to change this to Flex4

<s:Button label="Testing" styleName="buttonStyle"/>
<fx:Style>
    .buttonStyle{
    corner-radius:5;
    font-weight:bold;
}
</fx:Style>

What all do I need more to make the Flex 4 button, look exactly like the Flex 3 button?

The things that I can see right now are 1. The mouse-over-button gradients are very different. 2. The border for Flex4 button is different from Flex3.

How do I fix these two conditions, and are there more differences as well?

zero323
  • 322,348
  • 103
  • 959
  • 935
Zeeshan Rang
  • 19,375
  • 28
  • 72
  • 100

2 Answers2

6

What happens if you use the halo theme?

http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f85.html

http://blog.flexexamples.com/2009/07/14/using-the-halo-theme-in-flex-4/

Basically, set this compiler argument:

-theme=${flexlib}/themes/Halo/halo.swc
JeffryHouser
  • 39,401
  • 4
  • 38
  • 59
1

This can be easily done by creating a custom skin for the button.

<s:Button label="Testing" skinClass="com.myApp.Flex3ButtonSkin"/>

And inside the Skin class, modify the mxml objects within to make it look like the Flex 3 Button. With skin classes you can make the buttons and any other component look like anything.

Keith
  • 36
  • 1
  • 4