Change the color of modal part of the screen when showing popUp’s

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.

We would want the background around the popUp to be darker

Looks much better doesnt it

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 🙂

Advertisements

, ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: