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

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