home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / RadioactiveSnakesFromMa.swf / scripts / DefineSprite_211 / frame_2 / DoAction.as
Encoding:
Text File  |  2006-06-20  |  2.2 KB  |  66 lines

  1. depth = 0;
  2. player = 1;
  3. while(player <= _root.players)
  4. {
  5.    _root.player[player].speed = _root.speed;
  6.    _root.player[player].vspoints = 0;
  7.    _root.player[player].life = 720;
  8.    _root.player[player].oldspeed = _root.speed;
  9.    _root.player[player].ball = new Array();
  10.    i = 1;
  11.    while(i <= _root.snakeSize[player])
  12.    {
  13.       _root.player[player].ball[i] = new Object();
  14.       _root.player[player].ball[i].step = new Array();
  15.       _root.player[player].ball[i].delay = 0;
  16.       if(this.map["door" + player]._y < 48)
  17.       {
  18.          _root.player[player].ball[i].dir = 0;
  19.          xm = 0;
  20.          ym = 16;
  21.       }
  22.       else if(this.map["door" + player]._y > 464)
  23.       {
  24.          _root.player[player].ball[i].dir = 6;
  25.          xm = 0;
  26.          ym = -16;
  27.       }
  28.       else if(this.map["door" + player]._x < 16)
  29.       {
  30.          _root.player[player].ball[i].dir = 9;
  31.          xm = 16;
  32.          ym = 0;
  33.       }
  34.       else
  35.       {
  36.          _root.player[player].ball[i].dir = 3;
  37.          xm = -16;
  38.          ym = 0;
  39.       }
  40.       _root.player[player].ball[i].x = this.map["door" + player]._x - xm * (i - 2);
  41.       _root.player[player].ball[i].y = this.map["door" + player]._y - ym * (i - 2);
  42.       _root.player[player].ball[i].speed = _root.speed;
  43.       depth++;
  44.       this.snakeParts.duplicateMovieClip("p" + player + "b" + i,100 + depth);
  45.       _root.player[player].ball[i].clip = "p" + player + "b" + i;
  46.       if(i > 1)
  47.       {
  48.          this[_root.player[player].ball[i].clip].gotoAndStop(2);
  49.       }
  50.       this[_root.player[player].ball[i].clip]._x = _root.player[player].ball[i].x;
  51.       this[_root.player[player].ball[i].clip]._y = _root.player[player].ball[i].y;
  52.       this[_root.player[player].ball[i].clip]._rotation = _root.player[player].ball[i].dir * 30;
  53.       paint = new Color(this[_root.player[player].ball[i].clip]);
  54.       paint.setTransform(_root.player[player].fill[_root.player[player].cstep]);
  55.       _root.player[player].cstep = _root.player[player].cstep + 1;
  56.       if(_root.player[player].cstep > _root.player[player].colors)
  57.       {
  58.          _root.player[player].cstep = 1;
  59.       }
  60.       i++;
  61.    }
  62.    player++;
  63. }
  64. loop = 0;
  65. wait = 0;
  66.