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

  1. function shotGo()
  2. {
  3.    this._y += speed;
  4.    if(hitTest(_root.ship) && _root.ship.alive == true)
  5.    {
  6.       _root.ship.gotoAndPlay("die");
  7.       this.destroy();
  8.    }
  9.    if(_Y > 650)
  10.    {
  11.       this.destroy();
  12.    }
  13. }
  14. function destroy()
  15. {
  16.    for(name in this)
  17.    {
  18.       delete this[name];
  19.    }
  20.    delete this;
  21.    this.removeMovieClip();
  22. }
  23. speed = 8;
  24. this.onEnterFrame = shotGo;
  25. process = "shotGo";
  26.