So in previous two examples we have dived into how to make and show popUp’s in your Flex application. What if for example we have a Flex application that has a white background and when we show the popUp, we want the color of modal part to be a little darker. See two images below.
As you can see the 2nd popUp looks a bit nicer than the first. We can set the modalColor of our popUps to any color we like. We have 4 styles that are associated with popUp’s and Alerts in Flex. Those are:
- modalTransparencyColor – color of the modal part of the screen
- modalTransparency – transparency of the modal part of the screen, goes from 0 – fully transparent to 1 – no transparecy
- modalTransparencyBlur – blur of the background
- modalTransparencyDuration – how long should be the transition of modal part of the screen from not visible to fully visible
We have to set this styles in our Application MXML tag or Application styleTag when using stylesheets. For our example we used modalTransparencyColor=”#000000″ (black) and modalTransparency=”0.7″. Just playing a bit with these 4 styles can yield some interesting results when dealing with popUp’s and Alerts in Flex.
Happy Coding 🙂