<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/10/12/globally-setting-modal-styles-in-a-flex-application/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white" viewSourceURL="srcview/index.html">

    <mx:Style>
        global {
            modalTransparencyBlur: 0;
            modalTransparency: 0.8;
            modalTransparencyColor: black;
            modalTransparencyDuration: 500;
        }
    </mx:Style>

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

            private function showAlert():void {
                Alert.show("hello", "world");
            }

            private function setModelTransparencyColorStyle(color:Object):void {
                StyleManager.getStyleDeclaration("global").setStyle("modalTransparencyColor", color);
                showAlert();
            }
        ]]>
    </mx:Script>

    <mx:ApplicationControlBar dock="true">
        <mx:Button label="red"
                fillColors="[red,red]"
                click="setModelTransparencyColorStyle(0xFF0000);" />
        <mx:Button label="haloGreen"
                fillColors="[haloGreen,haloGreen]"
                click="setModelTransparencyColorStyle('haloGreen');" />
        <mx:Button label="haloBlue"
                fillColors="[haloBlue,haloBlue]"
                click="setModelTransparencyColorStyle('haloBlue');" />
        <mx:Button label="haloSilver"
                fillColors="[haloSilver,haloSilver]"
                click="setModelTransparencyColorStyle('haloSilver');" />
    </mx:ApplicationControlBar>

</mx:Application>