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

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