I was playing around with the beta release of Flex Builder 4 (now called Flash Builder 4 or Gumbo while it’s in beta) and I was astonished to see the linear background gradient options removed from CSS styles. After some research I found an article by Peter deHaan over at flexexamples.com. His article was somewhat dated in that it didn’t include the new (heavily debated) namespace changes, so I changed his source to include the new namespace rules and, voila, it worked perfectly.
It seems that you must create a new MXML component that extends the fx:Skin component and use FXG to draw the gradient yourself on the skin. You then set the skinClass property of the fx:Application to your newly created MXML fx:Skin component.
There are some characters missing when you view the code of this application:
HostComponent”spark.components.Application”)]
should be
[HostComponent(“spark.components.Application”)]
Oscar, Thanks for pointing this out, I meant to leave a comment but completely forgot. It seems like there is a bug in ASDoc that is incorrectly parsing the code. I have filed a bug on Adobe’s bug tracker regarding this issue: http://bugs.adobe.com/jira/browse/SDK-21735
I have updated the ASDoc generated HTML file manually to use the correct syntax. Thanks again Oscar.