home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / Frizzle_fraz.swf / scripts / Code / WINDOWS / _lo294.as < prev    next >
Encoding:
Text File  |  2008-09-26  |  5.3 KB  |  169 lines

  1. package Code.WINDOWS
  2. {
  3.    import Code.LIB._ei76;
  4.    import Code.LIB._hu299;
  5.    import Code.LIB._nd174;
  6.    import Code.LIB._nx518;
  7.    import Code.LIB._pw224;
  8.    import Code.OPTIONS._dx111;
  9.    import Code.WINDOWS.DIALOGS._dt399;
  10.    import Code._vy402;
  11.    import flash.events.Event;
  12.    import flash.events.MouseEvent;
  13.    
  14.    public class _lo294 extends _ei76
  15.    {
  16.       
  17.       public static const stNormal:int = 0;
  18.       
  19.       public static const stEnterName:int = 1;
  20.        
  21.       
  22.       private var iPlayers:Array;
  23.       
  24.       private var iLabel:_pw224;
  25.       
  26.       public var iEnterName:_dt399;
  27.       
  28.       public var iOk:_nx518;
  29.       
  30.       public var iCancel:_nx518;
  31.       
  32.       public var iDelete:_nx518;
  33.       
  34.       public var iNew:_nx518;
  35.       
  36.       public var iBLeft:_nx518;
  37.       
  38.       private var iInd:int;
  39.       
  40.       public var iBRight:_nx518;
  41.       
  42.       public function _lo294()
  43.       {
  44.          var _loc1_:String = null;
  45.          var _loc2_:Array = null;
  46.          _loc1_ = _dx111.iLanguage.strOk;
  47.          _loc2_ = [[_vy402._ps359,_dx111.iLanguage.strChangePlayer,_dx111.cGreen,30,_hu299.SmallText,70,40,null,true],[_vy402._jk562,_dx111.iLanguage.strOk,_dx111.cGellGreen,170,60,25,_dx111.cWhite,35,300,"iOk",true],[_vy402._jk562,_dx111.iLanguage.strCancel,_dx111.cGellRed,170,60,25,_dx111.cWhite,300,300,"iCancel",true],[_vy402._yi495,_dx111.cGellAqua,660,170,false,0.7,20,110,null,true],[_vy402._jk562,_dx111.iLanguage.strNew,_dx111.cGellGreen,170,60,25,_dx111.cWhite,480,120,"iNew",true],[_vy402._jk562,_dx111.iLanguage.strDelete,_dx111.cGellRed,170,60,25,_dx111.cWhite,480,200,"iDelete",true],[_vy402._ai205,40,40,"<",_dx111.cOrange,40,50,210,"iBLeft",true],[_vy402._ai205,40,40,">",_dx111.cOrange,40,200,210,"iBRight",true]];
  48.          super(_loc2_);
  49.          this.iPlayers = _nd174._du300;
  50.          _nk262();
  51.       }
  52.       
  53.       public function _nk262() : void
  54.       {
  55.          this.iLabel = new _pw224(30,_dx111.cAquaLight,_hu299.SmallText);
  56.          this.addChildAt(iLabel,6);
  57.          this.iLabel._vt351 = 40;
  58.          this.iLabel._lh238 = 120;
  59.          this.Label = _nd174._ai238;
  60.          this.iInd = _nd174.iPlayerPos;
  61.          this.State = stNormal;
  62.          this._gm53(50,10);
  63.       }
  64.       
  65.       private function set Label(param1:Array) : void
  66.       {
  67.          var _loc2_:* = null;
  68.          _loc2_ = new String();
  69.          _loc2_ = _dx111.iLanguage.strPlayerName + ":   " + String(param1[0]) + "\n";
  70.          _loc2_ += _dx111.iLanguage.strLevel + ":    " + int(param1[1]._wd393 + 1).toString() + "\n";
  71.          this.iLabel.Text = _loc2_;
  72.       }
  73.       
  74.       override public function onEnterFrame(param1:Event) : void
  75.       {
  76.          super.onEnterFrame(param1);
  77.          switch(this.state)
  78.          {
  79.             case stNormal:
  80.                break;
  81.             case stEnterName:
  82.                if(this.iEnterName._rm382 == false)
  83.                {
  84.                   if(!this.iEnterName._go241 && !_nd174._ai238)
  85.                   {
  86.                      this.iEnterName.show();
  87.                      return;
  88.                   }
  89.                   this.removeChild(this.iEnterName);
  90.                   if(this.iEnterName._go241)
  91.                   {
  92.                      _nd174._lg421(this.iEnterName._go241);
  93.                      this.iPlayers = _nd174._du300;
  94.                      this.iInd = _nd174.iPlayerPos;
  95.                      this.Label = _nd174._ai238;
  96.                   }
  97.                   this.iEnterName._fy281();
  98.                   this.iEnterName = null;
  99.                   this.State = stNormal;
  100.                }
  101.          }
  102.       }
  103.       
  104.       override public function _lf305(param1:MouseEvent) : void
  105.       {
  106.          if(this.iEnterName)
  107.          {
  108.             return;
  109.          }
  110.          if(param1.target == this.iNew._ol346)
  111.          {
  112.             this.State = stEnterName;
  113.          }
  114.          if(param1.target == this.iBLeft._ol346)
  115.          {
  116.             if(this.iInd == 0)
  117.             {
  118.                return;
  119.             }
  120.             --this.iInd;
  121.             this.Label = this.iPlayers[this.iInd];
  122.          }
  123.          if(param1.target == this.iBRight._ol346)
  124.          {
  125.             if(this.iInd >= this.iPlayers.length - 1)
  126.             {
  127.                return;
  128.             }
  129.             ++this.iInd;
  130.             this.Label = this.iPlayers[this.iInd];
  131.          }
  132.          if(param1.target == this.iDelete._ol346)
  133.          {
  134.             _nd174._hb542(this.iPlayers[this.iInd][0]);
  135.             if(!_nd174._ai238)
  136.             {
  137.                this.State = stEnterName;
  138.                this.iLabel.Text = " ";
  139.                return;
  140.             }
  141.             this.Label = _nd174._ai238;
  142.             this.iInd = _nd174.iPlayerPos;
  143.          }
  144.          if(param1.target == this.iOk._ol346)
  145.          {
  146.             _nd174._xk301(this.iPlayers[this.iInd][0]);
  147.             this.hide();
  148.          }
  149.          if(param1.target == this.iCancel._ol346)
  150.          {
  151.             this.hide();
  152.          }
  153.       }
  154.       
  155.       public function set State(param1:int) : void
  156.       {
  157.          this.state = param1;
  158.          switch(this.state)
  159.          {
  160.             case stNormal:
  161.                break;
  162.             case stEnterName:
  163.                this.iEnterName = new _dt399();
  164.                this.addChild(this.iEnterName);
  165.          }
  166.       }
  167.    }
  168. }
  169.