home *** CD-ROM | disk | FTP | other *** search
- package ENGINE.INTERFACE
- {
- import flash.events.Event;
-
- public class OAlert extends ODialog
- {
-
-
- protected var iMessages:Array;
-
- public var iButtons:Array;
-
- public function OAlert(param1:Array, param2:Array, param3:Array = null)
- {
- var _loc4_:Array = null;
- this.iMessages = param2;
- _loc4_ = !!param3 ? param3 : ODialog.iDefAnimators;
- super(param1,_loc4_);
- }
-
- override public function Init() : void
- {
- this.iButtons = new Array();
- super.Init();
- }
-
- override public function OnPress(param1:Event, param2:*) : void
- {
- var _loc3_:int = 0;
- var _loc4_:int = 0;
- if(!this.iMessages || !this.iButtons)
- {
- this.prVisible = false;
- return;
- }
- _loc3_ = 0;
- _loc4_ = 0;
- while(_loc4_ < this.iButtons.length)
- {
- if(param2 == this.iButtons[_loc4_] && _loc4_ < this.iMessages.length)
- {
- if(this.parent is OIObject)
- {
- (this.parent as OIObject).OnPress(null,iMessages[_loc4_]);
- }
- this.prVisible = false;
- return;
- }
- _loc4_++;
- }
- }
-
- override public function Free() : void
- {
- this.iButtons = null;
- super.Free();
- }
- }
- }
-