发表评论
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white"
creationComplete="init();">
<mx:Script>
<![CDATA[
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...");
}
]]>
</mx:Script>
<mx:ApplicationControlBar dock="true">
<mx:Button label="Red" themeColor="red" click="showAlert('red');" />
<mx:Button label="Green" themeColor="haloGreen" click="showAlert('haloGreen');" />
<mx:Button label="Blue" themeColor="haloBlue" click="showAlert('haloBlue');" />
</mx:ApplicationControlBar>
</mx:Application>
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。