Starting with a Clean Application style

When you create a new Application, by default the background color is bluish grey. Behind that the bluish grey color is a background image. This can be confusing to fix if you are trying to style the background.

The Flex provides another style sheet called “plain” that sets all padding to 0 pixels, removes the default background image, sets the background color to white, and left-aligns the children. The following example shows how you can set this style:

Unfortunately, this still flashes the blue grey background at start up and when the browser is resized. To fix this set the backgroundColor to #FFFFFF in the Application tag like so:

If you don’t want all the default styles of the “plain” style sheet and just want to clean up the background you can use the following code:

< ?xml version="1.0" encoding="utf-8"?>


This entry was posted in Flex. Bookmark the permalink.

One Response to Starting with a Clean Application style

  1. JabbyPanda says:

    Do not forget to set -default-background-color #FFFFFF
    in “Additional compiler arguments:”

Leave a Reply

Your email address will not be published. Required fields are marked *

Wrap your code before posting! Click the links below: