Alert.show()里面有多个属性,其中排在第三是flags,这个属性作用是在弹出的Alert提示框里面显示那一个或多个按钮,文档和书籍一般只写该属性可以自由组合 Alert.OK, Alert.CANCEL ,Alert.YES ,Alert.NO四个选项,并用“|”分隔,其实也可以用数字编号代替的,用数字编号更为简便,以下是编号对应的按钮组合表,一共有16个数字编号(其实只有15种组合)。
1- Alert.YES
2- Alert.NO
3- Alert.YES | Alert.NO
4- Alert.OK
5- Alert.OK | Alert.YES
6- Alert.OK | Alert.NO
7- Alert.OK | Alert.YES | Alert.NO
8- Alert.CANCEL
9- Alert.YES | Alert.CANCEL
10- Alert.NO | Alert.CANCEL
11- Alert.YES | Alert.NO | Alert.CANCEL
12- Alert.OK | Alert.CANCEL
13- Alert.OK | Alert.YES | Alert.CANCEL
14- Alert.OK | Alert.NO | Alert.CANCEL
15- Alert.OK | Alert.YES | Alert.NO | Alert.CANCEL
16- Alert.OK (和4一样)
17开始返回到1重新按顺序循环………..而flags属性不填写的话一般默认值为Alert.OK,也就是4或16。
例子:
//响应删除事件
private function doDelete():void
{
Alert.yesLabel="确定";
Alert.noLabel="取消";
Alert.show("是否确定删除选中记录?","删除记录",3,this,deleteCallBack);
}
//具体执行删除操作
private function deleteCallBack(event:CloseEvent):void
{
if(event.detail == Alert.YES)
{
Alert.okLabel="确定";
Alert.show("删除成功!");
}
}
分享到:
相关推荐
ActionScript Flex.3.Language.Reference.cnActionScript Flex.3.Language.Reference.cnActionScript Flex.3.Language.Reference.cn
org.springframework.flex-1.0.3.RELEASE.jar.zip用于JAR包,org.springframework.flex-1.0.3.RELEASE.jar.zip用于JAR包org.springframework.flex-1.0.3.RELEASE.jar.zip用于JAR包org.springframework.flex-1.0.3....
本课程主要是讲解Flex 4.6和ActionScript 3.0使用方法和技巧
php+flex.......................
Flex 3 Cookbook.Flex 3 Cookbook.Flex 3 Cookbook.Flex 3 Cookbook.Flex 3 Cookbook.Flex 3 Cookbook.Flex 3 Cookbook.
FlexLayout.html
flex-2.6.4.tar.gz
Adobe.Press.Adobe.Flex.2.Training.from.the.Source.Oct.2006_[Flex2.org].chm 欢迎下载Flex教程系列
Flex.show()使用及所带参数的具体使用,具体见文档说明。
跟我StepByStep学FLEX教程.pdf 跟我StepByStep学FLEX教程.pdf 跟我StepByStep学FLEX教程.pdf 跟我StepByStep学FLEX教程.pdf 跟我StepByStep学FLEX教程.pdf
Flex和Bison是为编译器和解释器的编程人员特别设计的工具,其前身分别是lex和Yacc,该压缩包中包含了适合于Windows系统的Flex和Bison程序,版本分别是较新的2.5.37和2.7,解压后需要将Flex和Bison的exe文件路径添加...
Flex Air 学习资料\01.Flex概述.rar
Flex 入门.pdf Flex 入门.pdf
Flex3.Style.Explorer.V3.0.Beta
Flex+BlazeDS+Spring整合,Flex数据推送,消息订阅代码
Flex布局.xmind
flex布局.html
ArcGIS API for Flex 2.0.chm ArcGIS API for Flex 2.0.chm
Flex快捷键.rarFlex快捷键.rarFlex快捷键.rar
一些不错的开源Flex项目.txt一些不错的开源Flex项目.txt