home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Esportes / GHtP.swf / scripts / __Packages / GUINumbers.as < prev    next >
Text File  |  2008-09-03  |  1KB  |  44 lines

  1. class GUINumbers extends MovieClip
  2. {
  3.    function GUINumbers()
  4.    {
  5.       super();
  6.       this.m_numbers = new Array();
  7.       var _loc4_ = 0;
  8.       while(_loc4_ < this.m_characters)
  9.       {
  10.          var _loc3_ = this.attachMovie("mc_GUI_number","number_1",this.getNextHighestDepth());
  11.          if(this.m_width == 0)
  12.          {
  13.             _loc3_._x = _loc4_ * _loc3_._width;
  14.          }
  15.          else
  16.          {
  17.             _loc3_._x = _loc4_ * this.m_width;
  18.          }
  19.          this.m_numbers.push(_loc3_);
  20.          _loc4_ = _loc4_ + 1;
  21.       }
  22.       var _loc5_ = new flash.geom.ColorTransform();
  23.       _loc5_.rgb = parseInt(this.m_color,16);
  24.       var _loc6_ = new flash.geom.Transform(this);
  25.       _loc6_.colorTransform = _loc5_;
  26.    }
  27.    function SetValue(number)
  28.    {
  29.       var _loc4_ = number.toString();
  30.       if(_loc4_.length > this.m_numbers.length)
  31.       {
  32.          return undefined;
  33.       }
  34.       var _loc5_ = this.m_numbers.length - _loc4_.length;
  35.       var _loc2_ = _loc4_.length - 1;
  36.       while(_loc2_ >= 0)
  37.       {
  38.          var _loc3_ = _loc4_.substring(_loc2_,_loc2_ + 1);
  39.          this.m_numbers[_loc2_ + _loc5_].gotoAndStop("#" + _loc3_);
  40.          _loc2_ = _loc2_ - 1;
  41.       }
  42.    }
  43. }
  44.