home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Acao / Titans / cyborg.swf / scripts / DefineSprite_134_atlas / frame_31 / DoAction.as
Encoding:
Text File  |  2006-01-05  |  487 b   |  34 lines

  1. a.gotoAndStop("attack");
  2. d = 25;
  3. ys = -10;
  4. backoff = 0;
  5. if(random(100) > 50)
  6. {
  7.    _xscale = -100;
  8. }
  9. onenterframe = function()
  10. {
  11.    d--;
  12.    if(d < 12)
  13.    {
  14.       r._x = random(10);
  15.       r._y = random(10);
  16.       if(d >= 10)
  17.       {
  18.          dx = math.abs(r.cbx - _X);
  19.          if(dx < 150)
  20.          {
  21.             r.hit = 1;
  22.          }
  23.       }
  24.    }
  25.    if(!d)
  26.    {
  27.       r._x = 0;
  28.       r._y = 0;
  29.       _xscale = 100;
  30.       gotoAndPlay(22);
  31.    }
  32. };
  33. stop();
  34.