7 Replies Latest reply on Dec 15, 2010 5:28 PM by Ned Murphy

    Help with code for score-keeping with dynamic text box


      Hi All,

      I'm having an actionscript 2.0 problem with keeping score.


      I have a dynamic text box with a variable called score.


      I have the following action code for that variable:


      _root.score = 0;


      For the correct answer button I have this action:
      _root.score = Number (score) +10;


      This works fine to increase the score by 10 for each correct answer.


      The problem is that I can't get an if statement to work for when the score reaches 150 to gotoAndPlay a certain frame. I've tried various syntax, I've tried it on the action for a button and an action for the timeline with: 
      onRelease = function () {


      (My learning game is set up to allow for users to answer up to four extra questions to reach the score of 150).

      Nothing works. Any suggestions please?