Archive for 2008-08

Css in Flex

2008-08-29

I had some issues today to change the background color of a button in Flex. The up-skin was set for the Button selector which meant setting the fill-colors property for the Button.special selector had no effect. Setting the up-skin to null was the only solution. This was easy to do in code with setStyle, but I wanted to do it in css. Writing null wasn’t quite enough. Apearently you need to use ClassReference(null). Hope this helps someone out.

Button {
  up-skin: Embed(source='img/example.png');
}
Button.special{
  up-skin: ClassReference(null);
  fill-alphas: 1.0, 1.0;
  fill-colors: #00FF00, #00FF00;
}