1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Flash Halloween Trivia Quiz

By

8 of 10

Scripting The Answers
Flash Halloween Trivia Quiz
Once you’ve finished converting all of your options, both right and wrong, to symbols: return to your first frame, right-click on the correct answer, and open the Actions pane. We’re going to tell Flash that when the user clicks on the right answer, it should take the value of the variable score that we created to tally the user’s number of correct answers, and add one to it. Then, it should advance to the next frame/next question:

on(release) {
score = score+1;
gotoAndPlay(3) ;

For the incorrect answer, you would just click to advance to the next frame without adding to the value of score:

on(release) {
gotoAndPlay(3) ;

Repeat this on every frame where you have a question save for the last, simply raising the frame number in the gotoAndPlay command by one so that it advances one frame/one question at a time. Leave the last question, as we’re going to do something different with that.

©2014 About.com. All rights reserved.