home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Puzzle / Clusterz / Clusterz.swf / scripts / ENGINE / INTERFACE / OAlert.as next >
Encoding:
Text File  |  2008-09-12  |  1.5 KB  |  60 lines

  1. package ENGINE.INTERFACE
  2. {
  3.    import flash.events.Event;
  4.    
  5.    public class OAlert extends ODialog
  6.    {
  7.        
  8.       
  9.       protected var iMessages:Array;
  10.       
  11.       public var iButtons:Array;
  12.       
  13.       public function OAlert(param1:Array, param2:Array, param3:Array = null)
  14.       {
  15.          var _loc4_:Array = null;
  16.          this.iMessages = param2;
  17.          _loc4_ = !!param3 ? param3 : ODialog.iDefAnimators;
  18.          super(param1,_loc4_);
  19.       }
  20.       
  21.       override public function Init() : void
  22.       {
  23.          this.iButtons = new Array();
  24.          super.Init();
  25.       }
  26.       
  27.       override public function OnPress(param1:Event, param2:*) : void
  28.       {
  29.          var _loc3_:int = 0;
  30.          var _loc4_:int = 0;
  31.          if(!this.iMessages || !this.iButtons)
  32.          {
  33.             this.prVisible = false;
  34.             return;
  35.          }
  36.          _loc3_ = 0;
  37.          _loc4_ = 0;
  38.          while(_loc4_ < this.iButtons.length)
  39.          {
  40.             if(param2 == this.iButtons[_loc4_] && _loc4_ < this.iMessages.length)
  41.             {
  42.                if(this.parent is OIObject)
  43.                {
  44.                   (this.parent as OIObject).OnPress(null,iMessages[_loc4_]);
  45.                }
  46.                this.prVisible = false;
  47.                return;
  48.             }
  49.             _loc4_++;
  50.          }
  51.       }
  52.       
  53.       override public function Free() : void
  54.       {
  55.          this.iButtons = null;
  56.          super.Free();
  57.       }
  58.    }
  59. }
  60.