home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Diversos / ntech.swf / scripts / DefineSprite_15_BadTargetTopID / frame_1 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  618 b   |  30 lines

  1. stop();
  2. Speed = Math.random() * 4 + 1 + _root.StageLevel / 10;
  3. this.onEnterFrame = function()
  4. {
  5.    DistY = Math.abs(_Y - _root.Device._y);
  6.    if(DistY <= 12)
  7.    {
  8.       if(this.hitTest(_root.laser) || this.hitTest(_root.WaveBlast))
  9.       {
  10.          play();
  11.          _root.Hitter.play();
  12.          _root.Wall.play();
  13.       }
  14.    }
  15.    if(_root.Special == "Missile")
  16.    {
  17.       if(this.hitTest(_root.Missile))
  18.       {
  19.          play();
  20.          _root.Missile.nextFrame();
  21.          HitbyMissle = true;
  22.       }
  23.    }
  24.    if(this._y > 660)
  25.    {
  26.       this.unloadMovie();
  27.    }
  28.    this._y += Speed;
  29. };
  30.