提醒确认框

  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="black" layout="horizontal">  
  3.     <mx:Script>  
  4.         <![CDATA[  
  5.             import mx.events.CloseEvent;  
  6.             import mx.controls.Alert;  
  7.             public function deleteConfirm():void{  
  8.                 Alert.yesLabel = 'yes';  
  9.                 Alert.noLabel = 'no';  
  10.                 Alert.cancelLabel = 'cancel';  
  11.                 Alert.show('确认要删除吗','info',1|2|8,this,back);      
  12.             }  
  13.             public function back(event:CloseEvent):void{  
  14.                 if(event.detail==Alert.YES){  
  15.                     Alert.show('削除しました');  
  16.                 }  
  17.             }  
  18.         ]]>  
  19.     </mx:Script>  
  20.     <mx:Button label="削除" click="deleteConfirm()"/>  
  21. </mx:Application>  

你可能感兴趣的:(Flex)