好多项目中经常用flex的弹出对话框,废话不说,直接代码!!!!
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="black" layout="horizontal">
<mx:Script>
<![CDATA[
import mx.events.CloseEvent;
import mx.controls.Alert;
public function deleteConfirm():void{
Alert.yesLabel = 'yes';
Alert.noLabel = 'no';
Alert.cancelLabel = 'cancel';
Alert.show('确认要删除吗','info',1|2|8,this,back);
}
public function back(event:CloseEvent):void{
if(event.detail==Alert.YES){
Alert.show('削除しました');
}
}
]]>
</mx:Script>
<mx:Button label="削除" click="deleteConfirm()"/>
</mx:Application>