Search This Blog

Showing posts with label flex. Show all posts
Showing posts with label flex. Show all posts

Tuesday, January 12, 2010

Opaque background with gradient

Using fillAphas with fillColors we can create attractive opaque gradient backgrounds backgrounds in Flex.

While I am still in the middle of my googling for the precise documentation of fillAlphas property, I could have learn that fillAlphas perpery is an array of two numeric elements between 0 and 1 which indicates opacity of the two parts of the correspoding Flex component . fillAlphas works hand-to-hand with fillColors as if there is no gradient, we do not need to adjust the opacity of different parts of the component.

Here is an example:



Canvas
{
fillAlphas: 1, 1;
fillColors: #FFFFFF,#D00808;
borderStyle: applicationControlBar;
}





and here's how it looks like-