14 Replies Latest reply on Dec 15, 2009 4:40 PM by Flex harUI

    Error in Simple mx Component Styling?

    pkrekelberg Level 1

      Like many, I am finding the behavior of CSS namespaces in Flex 4 very frustrating.

       

      I have a very simple example which is not working. I hope I'm missing something!

       

      I have a SWC with a defaults.css file. The CSS file is setting the style for Alert using the following:

       

       

      @namespace "http://www.adobe.com/2006/mxml";

       

       

      Alert

      {

      backgroundColor: #333333;

      borderColor:#555555;

      color: #ff0000;

      backgroundAlpha:0.9;

      borderAlpha:1;

      buttonStyleName: Button;

      paddingBottom: 8;

      }

       

       

      The namespace is set as you can see. I have also tried this by specifying "mx". The Alert box does not get styled, not even the background color gets set.

       

      What am I missing? I am using the Alert in Actionscript using Alert.show. This worked fine in Flex 3.