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>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值