home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / gladiator_castle_war.swf / scripts / DefineSprite_474 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-03-15  |  527 b   |  25 lines

  1. stop();
  2. n = 1;
  3. for(h in _root.possibleHair)
  4. {
  5.    if(h !== _root.playerActiveHair)
  6.    {
  7.       this["h" + n].gotoAndStop(_root.possibleHair[h]);
  8.       this["h" + n].num = h;
  9.       this["h" + n].onRelease = function()
  10.       {
  11.          if(_root.playerMoney >= 50)
  12.          {
  13.             _root.playerMoney -= 50;
  14.             _root.playerActiveHair = this.num;
  15.             nextFrame();
  16.          }
  17.          else
  18.          {
  19.             txt = "you do not have enough cash";
  20.          }
  21.       };
  22.       n++;
  23.    }
  24. }
  25.