1 Reply Latest reply on Sep 3, 2006 1:50 PM by kglad

    flash game score ques

    redsox05 Level 1
      I made a simple flash game in flash8.I want if the score reaches a certain point to goto a different screen to display a message or for a message to appear.I thought to put in this code
      if(score>=500)
      {_root.gotoAndStop(10);
      }

      after this line. _root.score+=100;
      but when I do it goes to frame 10 on the first shot instead of 500.
      here is the code for the laser. Am I putting the score code in the wrong place?Any help appreciated.


      onClipEvent (load) {
      laserMoveSpeed=20;
      this._y=_root.spaceship._y+45;
      this._x=_root.spaceship._x+100;
      }
      onClipEvent (enterFrame) {
      if (this._name<>"laser"){

      this._x+=laserMoveSpeed;
      if (this._x>600){
      _root.spaceship.laserCounter--;
      this.removeMovieClip();
      }
      for (i=1; i<=_root.numEnemy; i++){
      if (this.hitTest( _root["enemy"+i])){
      _root.score+=100;
      _root["enemy"+i].gotoAndPlay( 2 );
      _root.spaceship.laserCounter--;
      this.removeMovieClip();
      }
      }}
      } Text