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

  1. _X = 150 + random(300);
  2. _Y = 150 + random(100);
  3. _xscale = 15;
  4. _yscale = 15;
  5. ys = -5;
  6. dis = r.distance;
  7. dispass = -2;
  8. ro = 5;
  9. onenterframe = function()
  10. {
  11.    _rotation = _rotation + ro;
  12.    _Y = _Y + ys;
  13.    ys += 0.2;
  14.    dis += dispass;
  15.    _xscale = _xscale * 1.03;
  16.    _yscale = _yscale * 1.03;
  17.    if(dis < 0)
  18.    {
  19.       dis = 0;
  20.       if(_Y > 300)
  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.score += r.point;
  37.       r.zboom.start();
  38.       this.gotoAndPlay("exp");
  39.    }
  40. };
  41. stop();
  42.