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

  1. _X = 170 + random(280);
  2. _Y = 200;
  3. x = _X;
  4. _xscale = 10;
  5. _yscale = 10;
  6. ys = -5;
  7. dis = r.distance;
  8. onenterframe = function()
  9. {
  10.    _Y = _Y + ys;
  11.    _X = x + math.sin(a++ * 0.1) * 100;
  12.    b._rotation += 7;
  13.    ys += 0.1;
  14.    _xscale = _xscale * 1.02;
  15.    _yscale = _yscale * 1.02;
  16.    dis--;
  17.    if(dis < 0)
  18.    {
  19.       dis = 0;
  20.       if(_Y > 280)
  21.       {
  22.          r.zboom3.start();
  23.          if(math.abs(r.cbx - _X) < r.bombrange)
  24.          {
  25.             r.hit = 1;
  26.             r.enemies.removevalue(_name);
  27.          }
  28.          _xscale = _xscale * 2;
  29.          _yscale = _yscale * 2;
  30.          gotoAndPlay(2);
  31.       }
  32.    }
  33.    cekhit();
  34.    if(hit)
  35.    {
  36.       r.zboom.start();
  37.       r.score += r.point;
  38.       this.gotoAndPlay("exp");
  39.    }
  40. };
  41. stop();
  42.