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

  1. gotoAndStop(random(4) + 2);
  2. onEnterFrame = function()
  3. {
  4.    _X = _X + 18;
  5.    if(_X > 700)
  6.    {
  7.       this.removeMovieClip();
  8.    }
  9.    i = 1;
  10.    while(i <= 20)
  11.    {
  12.       if(_root["baddy" + i].area.hitTest(this._x,this._y,true))
  13.       {
  14.          _root.makeFlowerExplosion(_X,_Y);
  15.          _root["baddy" + i].health--;
  16.          _root.score += 1;
  17.          this.removeMovieClip();
  18.       }
  19.       i++;
  20.    }
  21.    i = 50;
  22.    while(i <= 75)
  23.    {
  24.       if(_root["bullet" + i].hitTest(this))
  25.       {
  26.          _root.makeFlowerExplosion(_X,_Y);
  27.          _root["bullet" + i].dead = true;
  28.          _root.score += 5;
  29.          this.removeMovieClip();
  30.       }
  31.       i++;
  32.    }
  33.    _X = _X - _root.player.hSpeed;
  34. };
  35.