home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 June / Chip_2004-06_cd1.bin / oddech / table / TableFootie.swf / scripts / DefineSprite_201 / frame_1 / DoAction.as
Text File  |  2004-05-05  |  515b  |  33 lines

  1. function move(speed)
  2. {
  3.    var rot = 0;
  4.    if(speed < 0)
  5.    {
  6.       rot = -90;
  7.    }
  8.    else if(speed > 0)
  9.    {
  10.       rot = 90;
  11.    }
  12.    var i = 1;
  13.    while(i < 5)
  14.    {
  15.       var row = eval("r" + i);
  16.       for(var man in row)
  17.       {
  18.          row[man]._rotation = rot;
  19.          if(speed == 0)
  20.          {
  21.             row[man].gr.run.gotoAndStop(1);
  22.          }
  23.          else
  24.          {
  25.             row[man].gr.run.play();
  26.          }
  27.       }
  28.       i++;
  29.    }
  30.    _Y = _Y + speed;
  31. }
  32. pl = -1;
  33.