home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Acao / Titans / raven.swf / scripts / DefineSprite_20_rub / frame_1 / DoAction.as
Encoding:
Text File  |  2006-01-05  |  1.3 KB  |  68 lines

  1. if(tipe > 10)
  2. {
  3.    ys = 0.6 * r.rubspeed;
  4. }
  5. else
  6. {
  7.    ys = r.rubspeed + random(4);
  8. }
  9. ro = 2 + random(10);
  10. if(random(100) > 50)
  11. {
  12.    ro = - ro;
  13. }
  14. onenterframe = function()
  15. {
  16.    _rotation = _rotation + ro;
  17.    _Y = _Y + ys;
  18.    ys += r.grav;
  19.    if(r.esp)
  20.    {
  21.       if(!r.got)
  22.       {
  23.          if(tipe <= 10)
  24.          {
  25.             if(a.hittest(r.cursor))
  26.             {
  27.                r.got = tipe;
  28.                r.attachmovie("rub2","rub2",r.rd);
  29.                r.rub2._rotation = _rotation;
  30.                r.rub2.tipe = tipe;
  31.                r.rub2._x = _X;
  32.                r.rub2._y = _Y;
  33.                r.rd = r.rd + 1;
  34.                r.rubs.removevalue(_name);
  35.                this.removeMovieClip();
  36.             }
  37.          }
  38.       }
  39.       else if(z.hittest(r.rub2.z))
  40.       {
  41.          r.crash = 1;
  42.          tipe2 = r.rub2.tipe;
  43.          r.rubs.removevalue(_name);
  44.          vx = r.vx;
  45.          vy = r.vy;
  46.          gotoAndPlay(5);
  47.       }
  48.    }
  49.    if(!r.inv)
  50.    {
  51.       if(z.hittest(n.z))
  52.       {
  53.          r.hit = 1;
  54.       }
  55.    }
  56.    if(_Y > 480)
  57.    {
  58.       if(!r.cheat1)
  59.       {
  60.          r.energy -= r.energymiss;
  61.          r.bar.barfr.play();
  62.       }
  63.       r.rubs.removevalue(_name);
  64.       this.removeMovieClip();
  65.    }
  66. };
  67. stop();
  68.