home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Acao / Titans / robin.swf / scripts / DefineSprite_353 / frame_12 / DoAction.as
Encoding:
Text File  |  2006-01-05  |  1.4 KB  |  89 lines

  1. r.bar.barfr.play();
  2. if(!r.cheat1)
  3. {
  4.    r.energy -= r.energyless;
  5. }
  6. if(r.hit == 18)
  7. {
  8.    r.zcarbump.start();
  9.    s._y = r.hitpos;
  10.    ys = 0.5 * r.ydiv;
  11. }
  12. else
  13. {
  14.    ys = 0;
  15.    r.zboom2.start();
  16. }
  17. s.attachmovie("blink","blink",200);
  18. r.inv = r.invhitdelay;
  19. xs = 0.3 * r.carspeed;
  20. if(r.energy <= 0)
  21. {
  22.    d = 54;
  23.    r.noshot = 999;
  24.    expdelay = 7;
  25.    exd = expdelay;
  26.    exdp = 220;
  27. }
  28. else
  29. {
  30.    d = 15;
  31.    r.noshot = d;
  32. }
  33. r.shakebike = 1;
  34. onenterframe = function()
  35. {
  36.    nx = s._x + xs;
  37.    ys *= 0.97;
  38.    ny = s._y + ys;
  39.    if(r.energy > 0)
  40.    {
  41.       ceklimits();
  42.    }
  43.    else
  44.    {
  45.       if(this.ny < r.ymin)
  46.       {
  47.          this.ny = r.ymin;
  48.       }
  49.       if(this.ny > r.ymax)
  50.       {
  51.          this.ny = r.ymax;
  52.       }
  53.       exd--;
  54.       if(!exd and etotal < 4)
  55.       {
  56.          etotal++;
  57.          exd = expdelay + random(5);
  58.          s.attachmovie("expl","expl" + exdp,exdp);
  59.          r.zboom2.start();
  60.          ska = 20 + random(20);
  61.          var se = s["expl" + exdp];
  62.          se._xscale = ska;
  63.          se._yscale = ska;
  64.          se._y = -10 - random(20);
  65.          se._x = -60 + random(80);
  66.          exdp++;
  67.       }
  68.    }
  69.    s._x = nx;
  70.    if(r.hit == 18)
  71.    {
  72.       s._y = ny;
  73.    }
  74.    d--;
  75.    if(!d)
  76.    {
  77.       if(r.energy <= 0)
  78.       {
  79.          r.gotoAndPlay("lose");
  80.       }
  81.       else
  82.       {
  83.          r.shakebike = 0;
  84.          gotoAndPlay(1);
  85.       }
  86.    }
  87. };
  88. stop();
  89.