Alert 和 style

http://hi.baidu.com/zhao_gw/blog/item/ddb4f7d18c7226349b5027d9.html

 

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        creationComplete="showAlert();">
 
    <mx:Script>
        <![CDATA[
            import mx.controls.Alert;
 
            private var alert:Alert;
 
            private function showAlert():void {
                alert = Alert.show("The quick brown fox jumped over the lazy dog.", "title");
            }
        ]]>
    </mx:Script>
 
    <mx:Style>
        Alert {
            backgroundAlpha: 0.3;
            backgroundColor: red;
            borderAlpha: 0.3;
            borderColor: red;
            dropShadowEnabled: false;
        }
    </mx:Style>
 
    <mx:ApplicationControlBar dock="true">
        <mx:Button label="Show alert" click="showAlert();" />
    </mx:ApplicationControlBar>
 
</mx:Application>

 

 

http://flexmusings.wordpress.com/2008/01/21/using-same-color-for-border-background-of-flex-alert-control/

 

 

 

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

<!-- giving colors to the text, border & background of an alert control-->

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
	layout="absolute"
	width="320"
	height="240"
	backgroundGradientColors="[#ffffff, #b0b0ff]"
	>

	<mx:Style>
		Alert{
			/*Change this to give different background colors
			{where the alert message is displayed}
			backgroundColor: #ffffff;*/

			backgroundColor: #b0b0ff;
			borderColor: #b0b0ff;
			color: #000000;
		}
	</mx:Style>

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

			private var _alert:Alert;

			private function showAlert():void{
				_alert = Alert.show("The Alert message goes here","The Alert title goes here");
			}
		]]>
	</mx:Script>

	<mx:Button label="Show Alert" click="showAlert()" x="116" y="109"/>

</mx:Application>

你可能感兴趣的:(xml,Blog,wordpress,Flex,Adobe)