class mx.controls.Alert extends mx.containers.Window { var __set__visible, styleName, __set__contentPath, initializing, parent, __get__width, __get__height, move, _child0, width, __width, height, __height, border_mc, back_mc, invalidate; static var style, titleStyleDeclaration, messageStyleDeclaration; function Alert() { super(); } // End of the function static function show(text, title, flags, parent, listener, icon, defButton) { var _loc2 = new Object(); var _loc6 = flags & mx.controls.Alert.NONMODAL ? (false) : (true); if (parent == undefined) { parent = _loc2.parent = _root; } else { _loc2.parent = parent; } // end else if _loc2.okButton = flags & mx.controls.Alert.OK ? (true) : (false); _loc2.cancelButton = flags & mx.controls.Alert.CANCEL ? (true) : (false); _loc2.yesButton = flags & mx.controls.Alert.YES ? (true) : (false); _loc2.noButton = flags & mx.controls.Alert.NO ? (true) : (false); _loc2.defButton = defButton; if (_loc2.okButton == false && _loc2.cancelButton == false && _loc2.yesButton == false && _loc2.noButton == false) { _loc2.okButton = true; _loc2.defButton = mx.controls.Alert.OK; } // end if _loc2.title = title; _loc2.text = text; _loc2.icon = icon; _loc2.style = mx.controls.Alert.style; _loc2.skinTitleBackground = mx.controls.Alert.titleBackground; _loc2.titleStyleDeclaration = mx.controls.Alert.titleStyleDeclaration; _loc2.validateNow = true; var _loc4 = mx.managers.PopUpManager.createPopUp(parent, mx.controls.Alert, _loc6, _loc2); if (_loc4 == undefined) { trace ("Failed to create a new alert, probably because there is no Alert in the Library"); } // end if _loc4.addEventListener("click", listener); return (_loc4); } // End of the function function init(Void) { super.init(); this.__set__visible(false); } // End of the function function createChildren(Void) { if (mx.controls.Alert.messageStyleDeclaration != undefined) { styleName = mx.controls.Alert.messageStyleDeclaration; } // end if var _loc3 = mx.controls.alertClasses.AlertForm; this.__set__contentPath(_loc3); super.createChildren(); } // End of the function function getViewMetrics(Void) { var _loc2 = super.getViewMetrics(); return (_loc2); } // End of the function function doLayout(Void) { super.doLayout(); } // End of the function function draw(Void) { var _loc9 = initializing; super.draw(); if (_loc9) { var _loc5 = new Object(); _loc5.x = parent._x; _loc5.y = parent._y; parent.localToGlobal(_loc5); var _loc7 = parent.width; var _loc8 = parent.height; if (parent == _root && parent._parent == undefined || _loc7 == undefined) { var _loc6 = mx.managers.SystemManager.__get__screen(); _loc7 = _loc6.width; _loc8 = _loc6.height; _loc5.x = _loc6.x; _loc5.y = _loc6.y; } // end if if (_global.isLivePreview) { return; } // end if _loc5.x = _loc5.x + (_loc7 - this.__get__width()) / 2; _loc5.y = _loc5.y + (_loc8 - this.__get__height()) / 2; parent.globalToLocal(_loc5); this.move(_loc5.x, _loc5.y); if (_child0.defButtonName != undefined) { _child0[_child0.defButtonName].setFocus(); } else { _child0.buttons[0].setFocus(); } // end if } // end else if } // End of the function function size(Void) { if (_global.isLivePreview) { __width = width; __height = height; } else { var _loc4 = _child0.getSize(); if (isNaN(_loc4.width) || _loc4.width < 20) { _loc4.width = 96; } // end if if (isNaN(_loc4.height) || _loc4.height < 20) { _loc4.height = 66; } // end if var _loc5 = border_mc.__get__borderMetrics(); if (!allowSize) { __width = _loc4.width + 2 * _loc5.left; __height = _loc4.height + _loc5.top + _loc5.bottom + back_mc.height; allowSize = false; } // end if } // end else if super.size(); } // End of the function function setSize(w, h) { __width = w; __height = h; initializing = allowSize = true; this.invalidate(); } // End of the function static var symbolOwner = mx.containers.Window; static var version = "2.0.2.126"; static var buttonWidth = 50; static var buttonHeight = 22; static var okLabel = "OK"; static var yesLabel = "Yes"; static var noLabel = "No"; static var cancelLabel = "Cancel"; static var buttonUp = "ButtonSkin"; static var buttonDown = "ButtonSkin"; static var buttonOver = "ButtonSkin"; static var titleBackground = "TitleBackground"; static var buttonUpEmphasized = "ButtonSkin"; static var buttonOverEmphasized = "ButtonSkin"; static var buttonDownEmphasized = "ButtonSkin"; var className = "Alert"; var allowSize = false; static var NONMODAL = 32768; static var YES = 1; static var NO = 2; static var OK = 4; static var CANCEL = 8; static var P = _root; } // End of Class