home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / 30k_starfighter.swf / scripts / DefineSprite_48_bankrupt / frame_1 / DoAction.as
Encoding:
Text File  |  2006-07-26  |  633 b   |  33 lines

  1. function bankruptGo()
  2. {
  3.    _Y = _Y + 4;
  4.    if(_X < _root.ship._x)
  5.    {
  6.       _X = _X + 2.5;
  7.    }
  8.    else if(_X > _root.ship._x)
  9.    {
  10.       _X = _X - 2.5;
  11.    }
  12.    if(hitTest(_root.ship))
  13.    {
  14.       _root.ship.bonus = 0;
  15.       _root.ship.shotType = "bullet";
  16.       _root.ship.multiplier = 1;
  17.       _root.ship.loadTime_p = 400;
  18.       _root.ship.speed_p = 12;
  19.       _root.score -= 5000;
  20.       if(_root.score < 0)
  21.       {
  22.          _root.score = 0;
  23.       }
  24.       this.removeMovieClip();
  25.    }
  26.    if(_Y >= 600)
  27.    {
  28.       this.removeMovieClip();
  29.    }
  30. }
  31. this.onEnterFrame = bankruptGo;
  32. process = "bankruptGo";
  33.