How to Make Your Own Flash Quiz Game on Macromedia
Flash quiz games are one of the more popular type of games made with Flash, mainly because they are relatively easy to make. They require the player to answer questions correctly in order proceed, and end if the user answers a question incorrectly. This article will teach you the basic framework of creating a quiz game which will give you the knowledge needed in order to create more creative and complex quizzes later on. Some basic knowledge of navigating Flash may be required for this guide.
Instructions
-
-
1
Start Adobe Flash, click on \"File,\" then on \"New.\" Select \"Flash File (ActionScript 2.0)\" and click \"OK\" to create a new Flash document.
-
2
Press \"F6\" four times. This will create four new key frames on the time-line, and you will have five key frames in total. (One key frame is automatically created at the start).
-
-
3
Select the first key frame and press \"F9\" to bring up the actions field for the key frame. Insert this bit of ActionScript code into the actions field: <br /><br />stop()<br />GO<br /><br />Repeat this step for all five key frames.
-
4
Select the first key frame and use the text tool to create a title such as \"The Hardest Quiz Ever!\" This first key frame will act as the quiz's title screen.
-
5
Click on \"Window\" (located on the top toolbar), select \"Common Libraries,\" and click on \"Buttons.\"
-
6
Browse through the buttons and find one you wish to use. Select it and drag it onto the workspace.
-
7
Use the selection tool and select the button you just added. Press \"F9\" to bring up its actions field and insert this ActionScript code into it:<br /><br />on (release){<br /> gotoAndStop(2)<br />GO<br />}<br /><br />This tells the button to take the user to the second key frame of the document where you will create the first question.
-
8
Select the second key frame on the time-line and use the text tool to write a question on the workspace. For example, you may write, \"What does 2 + 2 equal?\"
-
9
Use the text tool to create a correct answer to the question, in this case, use it to write \"4.\" Repeat this step, but this time write an incorrect answer, such as \"22.\"
-
10
Use the selection tool to select the correct answer (4) and press \"F8\" to bring up symbol conversion window. Select \"Button\" for the symbol type, leave everything else unchanged, and press \"OK\" to finish. Repeat this step for the incorrect answer as well.
-
11
Use the selection tool to select the correct answer's button (4), and press \"F9\" to bring up the actions field. Insert this bit of code into the actions field: <br /><br />on (release){<br /> gotoAndStop(3)<br />GO<br />}<br /><br />This code tells the Flash document to go onto the next question, which in this case is located in the third key frame (indicated by the 3 in the code).
-
12
Use the selection tool to select the incorrect answer's button (22), and press \"F9\" to bring up the actions field. Insert this bit of code into the actions field: <br /><br />on (release){<br /> gotoAndStop(5)<br />GO<br />}<br /><br />This code tells the Flash document to go to the \"You Lose!\" screen, which in this case will be created in the fifth key frame (indicated by the 5 in the code).
-
13
Select the third key frame and repeat Step 8 through Step 12 to create the second question. When adding the ActionScript code for the correct answer in this key frame, make sure to change the integer to \"4\" which will lead the player to the \"You Win!\" screen that will be created in the fourth key frame.
-
14
Select the fourth key frame and use the text tool to write \"You Win!\" on the workspace. This will be the victory screen the user will see if he or she successfully answered all of the questions correctly.
-
15
Add a button on the workspace. Alternatively, you may also create one instead and name it \"Replay.\"
-
16
Select the button with the selection tool, press \"F9\" to bring up its actions field, and insert this code into it: <br /><br />on (release){<br /> gotoAndStop(1)<br />GO<br />}<br /><br />This tells the document to bring up the first key frame which contains the quiz game's starting screen. This allows the player to play the quiz again.
-
17
Select the fifth key frame and repeat Step 14 through Step 16. Remember to write \"You Lose!\" while repeating Step 14 this time because you are creating the game's losing screen.
-
1
References
- Photo Credit Ciaran Griffin/Lifesize/Getty Images