6 Replies Latest reply on Dec 7, 2017 6:46 AM by JoãoCésar

    Animate True/False game, scoring

    sc41097207

      I"m trying to make a simple True/False game in Animate.  I want to keep score, with each correct answer getting one point.  After clicking T/F, the game advances to the next keyframe(question).  At present, the score is doubling/tripling out of control.  High score should only be 10pts, but this is getting over 200....help.

       

      this.stop();

      theScore = 0;

      this.myscore.text = theScore;

       

      theScore = theScore;

      this.myscore.text = theScore;

       

      //button actions

      this.truebutton.addEventListener("click", fl_ClickToGoToAndStopAtFrame1.bind(this));

      function fl_ClickToGoToAndStopAtFrame1()

      {

      this.gotoAndStop("q2");

      theScore++;

      this.myscore.text = theScore;

      }

       

       

      this.falsebutton.addEventListener("click", fl_ClickToGoToAndStopAtFrame2.bind(this));

      function fl_ClickToGoToAndStopAtFrame2()

      {

      this.gotoAndStop("q2");

      }