0 Replies Latest reply on Jan 29, 2013 10:41 AM by mmcTimmermans

    Alert button style

    mmcTimmermans Level 1

      Dear all

       

      When using

       

      Alert.show("Hey !", 'Alert', mx.controls.Alert.OK)

       

      The style is not the Style of the CS Application (in this case Illustrator)

       

      So I use

       

      var alertCSS:CSSStyleDeclaration = StyleManager.getStyleManager(null).getStyleDeclaration("mx.controls.Alert");

      alertCSS.setStyle("modalTransparencyColor", UIColor2Uint(skin.appBarBackgroundColor))

      alertCSS.setStyle("backgroundColor", UIColor2Uint(skin.appBarBackgroundColor));

       

      with

       

      private function UIColor2Uint(rgb:UIColor):uint {

            var red:uint = rgb.color.red;

            var green:uint = rgb.color.green;

            var blue:uint = rgb.color.blue;

            var uintVal:uint = red << 16 | green << 8 | blue;

            return uintVal;

      }

       

      to set the background color of alert windows.

       

      But how can I do this with the button? Currently it is blue and I have no clue how to influence this.

       

      I tried this with no success:

      http://stackoverflow.com/questions/2568269/customize-the-alert-box-with-two-buttons

       

      thanks and best regards