Css in Flex

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');
  up-skin: ClassReference(null);
  fill-alphas: 1.0, 1.0;
  fill-colors: #00FF00, #00FF00;

One Response to “Css in Flex”

  1. Mark says:

    Thanks so much. I just needed to do the same and could not figure out how until I read your blog.