Mega Code Archive

 
Categories / Flex / Components
 

An Alert dialog with custom button labels

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">   <mx:Script>            import mx.events.CloseEvent;       import mx.controls.Alert;              [Embed(source="a.png")]       private var questionIcon:Class;              private function simpleAlert():void{         Alert.yesLabel = "Oh Yath!!!";         Alert.noLabel = "NO WAY!!";         Alert.buttonWidth = 100;         Alert.show("an Alert dialog with custom button labels", "Alert with Button Labels",(Alert.YES | Alert.NO));       }            </mx:Script>      <mx:Button label="Show Alert Message" click="simpleAlert()"/>     </mx:Application>