// str 名字的首字母
var str:String = event.asName.charAt();
// 判断第一个字母是否为大写 else Alert
if (event.asName.substr(0,1)>='A'&&event.asName.substr(0,1)<='Z'){
// 判断str 如果等于A-Z 则通过
if(str == event.asName.substr(0,1)){
// 判断宽度小于 320px 则 Alert
if(event.width < 320){
Alert.show("注意 :最小宽度为 320px");
// 如果高度不为整数则 Alert
}else if(!(Number(tiHeight.text) is int)){
Alert.show("注意 :您的高度不为整数!请修改,谢谢合作!");
// 如果路径为空的话则 Alert
}else if(event.savePath == ""){
Alert.show("注意 :路径不能为空!请修改,谢谢合作!");
// else 通过
}else{
this.dispatchEvent(event);
//事件跑出去后,关闭这个窗口
PopUpManager.removePopUp(this);
}
}
}else{
Alert.show("注意 : 请输入正确的文件名!");
}