Is this what you want . try this and tell me -

<?xml version="1.0" encoding="utf-8"?>
<!-- 
http://blog.flexexamples.com/2008/02/29/styling-alert-controls-in-flex-using-the-stylemanager-class-and-setstyle-methods/
-->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        creationComplete="init();">

    <mx:Script>
        <![CDATA[
                import mx.controls.Button;
            import mx.controls.Alert;
            import mx.styles.StyleManager;

            private var alert:Alert;
            private var alertCSS:CSSStyleDeclaration;

            private function init():void {
                alertCSS = StyleManager.getStyleDeclaration("Alert");
            }

            private function showAlert(color:Object):void {
                alertCSS.setStyle("modalTransparencyColor", color);
                alertCSS.setStyle("themeColor", color);
                alert = Alert.show("The quick brown fox...");
                var btnNew:Button = new Button();
                btnNew.label ="close";
                alert.addChild(btnNew);;
            }
        ]]>
    </mx:Script>

    <mx:ApplicationControlBar dock="true">
        <mx:Button label="Red"
                themeColor="red"
                click="showAlert('red');" />

    </mx:ApplicationControlBar>

</mx:Application>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to