A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: QUIZ SCORE goes on increasing

  1. #1
    Senior Member
    Join Date
    Dec 2000
    I have made a quiz where for the scoring, I have given a texfield a variable(score) and there r four buttons for answers on the right one I have given the script

    set variable

    but the problem is that if the user clicks that button twice or thrice the score also increases with every click.
    How do I stop this

  2. #2
    Senior Member
    Join Date
    Jun 2000
    One way to accomplish this would be to put your button in an MC with two frames, one frame has the active button and the other has a dud.

    1) Frame1:

    Place your button and add the script:

    on (release) {
    score = score+10;
    gotoAndStop (2);

    2) Frame 2: Place another instance of your button here but without any script.

    When the user clicks on the button the button MC will go to frame 2 where a dud button is, if the user tries to press this button again it wont work as theres no script on it.

    Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center