home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / peaceplane.swf / scripts / DefineSprite_134_bullet / frame_1 / DoAction.as
Encoding:
Text File  |  2006-09-05  |  527 b   |  30 lines

  1. grav = 1;
  2. onEnterFrame = function()
  3. {
  4.    if(!dead)
  5.    {
  6.       _X = _X - 6;
  7.       if(_root.player.area.hitTest(_X,_Y))
  8.       {
  9.          _root.explode(1,_X,_Y);
  10.          _root.player.health--;
  11.          this.removeMovieClip();
  12.       }
  13.       if(_X < -20)
  14.       {
  15.          this.removeMovieClip();
  16.       }
  17.    }
  18.    else
  19.    {
  20.       _Y = _Y + grav;
  21.       grav++;
  22.       if(_Y > 112)
  23.       {
  24.          _root.makeSplash(_X,50);
  25.          this.removeMovieClip();
  26.       }
  27.    }
  28.    _X = _X - _root.player.hSpeed;
  29. };
  30.