New Quiz Components
Here are two new components Quiz_MultipleChoiceQuestion and Quiz_MultipleChoiceQuestions. The first component allows you to easily create a single multiple choice type question with radio button responses. The second component is based on the first, but is configured to present an entire quiz (multiple questions) with a scroll bar to allow easy navigation between the questions.
After answering a question, the display automatically moves to the next question after a predefined delay.
Use the scroll bar to move back to previous questions for review.
This component will allow you to rapidly deploy a multiple choice quiz.
Methods are provided to give a detailed analysis of the results. These results include percentage correct, total score, maximum score, time taken as well as a report which shows the incorrectly answered questions along with the correct answers.
An example quiz based on the Quiz_MultipleChoiceQuestions component is shown below:
The sample .swi file can be downloaded from here.
Analysis
The sample movie is split into three scenes. Note that each scene has its ‘stop playing at end’ attribute set. The image of the teacher is shared between all of the scenes using the content library (max3 only). This sharing saves loading time.
Scene_0 is used as a general introduction to the quiz. As the quiz is timed, this scene delays the loading of the quiz (and associated timing) until the user is ready to commence. Timing starts once the quiz is loaded. A component button, Button_glossy_pill is configured to go to the next scene when pressed.
Scene_1 is the main quiz and it contains the Quiz_MultipleChoiceQuestions
component which has the object name Quiz_MultipleChoice.
The questions can be altered by selecting Quiz_MultipleChoice
in the Outline panel and then altering the Quiz Text parameter. If the parameters panel is not visible, you can open it using Main Menu | Window and check the Parameters option.
At time of publishing the parameter Quiz Text had the following value:
Q1. In what year did Voyager 2 come closest to Uranus? 1984 1985 1986|20 1987 1988 Q2. How many previously unknown moons of Uranus did Voyager 2 discover? None 5 7 10|20 12 Q3. Is Uranus bigger in volume than Neptune? Yes|10 No Q4. Is Uranus bigger in mass than Neptune? Yes No|10 Q5. Is Triton a moon of Jupiter Saturn Uranus Neptune|15 Pluto Q6. What year was SWiSH Max3 released? 2006 2007 2008 2009|5 2010 Q7. Who discovered Uranus? Dr. Who William Herschel|10 David Wallas Edwin Hubble Q8. Mars is: The 2nd planet from the Sun The 3rd planet from the Sun The 4th planet from the Sun|10 A Dwarf planet
This demonstrates the general layout of the quiz definition:
- Each question group is separated by exactly one blank line.
- Each question and each corresponding answer occupies a single line.
- Points are allocated to the correct answer by adding |nn to the end of the answer. | is the separation character and nn is the score associated with the given answer.
- Negative scores can be given. If the score is omitted, then a score of 0 is assumed.
To make the quiz work as shown, some ‘glue’ script in the form af an Events function is needed. This script is called by both the quiz object (n = “Quiz_MultipleChoice“) and the submit button (n = “Button_done“).
When called by the quiz object, the script checks to see if the last question has been answered. If it has, it enables the submit button (Button_done).
When called by the submit button (Button_done) it checks to see if there are any unanswered questions. If there are, it displays the first unanswered question. If all questions are answered, it Totals the result (see the line below)
results = Quiz_MultipleChoice.TestComplete( ...,
which saves the results in the object result. It then progresses to the next scene to display the results.
The script is shown below:
function Events(n,v,finalquestion) {
switch(n) {
case "Button_done":
// called by button. Total up quiz or show any unanswered questions
if (Quiz_MultipleChoice.ShowFirstUnanswered()) {
// all questions have been answered, show results.
results = Quiz_MultipleChoice.TestComplete("You Said: ", "Correct Answer: ");
nextSceneAndPlay(); // show the results
}
break;
case "Quiz_MultipleChoice":
// called by quiz on completion of a question
Button_done._visible = finalquestion; // only show button on final question answered
}
}
onSelfEvent (load) {
var results:Object; // results will be stored here.
Button_done._visible = false; // initially hide the submit button as test is incomplete
}
Scene_2 is used to display the results. The text for the scrolling text box (textscroll) is formatted and entered by the following script. The script is called on frame (5) to give the textscroll object time to initialize after the scene becomes active.
onFrame (5) {
// format a response string for the scrolling text box.
// the results object was defined in Scene_1 and had the results
// entered by the Events function in Scene_1.
var response:String = "";
response += "Your Score: " add results.percentScore add "% ";
response += results.correct add "/" add results.questions add newline;
response += "Time taken: " add results.timeMin add "min " add results.timeSec add "seconds" add newline;
response += results.report;
// write the formatted response to the scrolling text box.
textscroll.SetText(response);
}
General Notes. With the exception of the image of the teacher, all of the objects were either components or standard objects. The source location of each of the movie objects is shown in the table below.
| Object | Source |
| Scene_0. Button_glossy_pill |
Component: Buttons | Pushbutton | Button_glossy_pillModified to goto next scene on press. (Event Goto) |
| Scene_0. Vell hello… |
Static text object |
| Scene_0. Callout_speech_rectangle |
Component: Shapes | 2D | Callouts | Callout_speech_rectangle |
| Scene_1. Quiz_MultipleChoice |
Component: Utility | Quiz_MultipleChoiceQuestionsAdvanced / Event Function Name altered to be Events. Note that this is the same function as used by the Button, Button_done. |
| Scene_1. blackboard |
Autoshape: Rounded RectangleBackground solid fill altered to be very light grey. |
| Scene_1. Button_done |
Component: Buttons | Pushbutton | Button_glossy_pillEvent Notification, Event function modified to be Events. Note that this is the same function name used by the quiz component. |
| Scene_1. speechcloud |
Made from the following two objects. Grouped as movie clip to allow easier positioning. |
| You can … | Static text object |
| Callout_speech_ellipse | Component: Shapes | 2D | Callouts | Callout speech_ellipse |
| Scene_2. textscroll |
Component: Text display | TextScroll_silverModified textscroll.frame so that the colors of the frame are all 0% alpha (ie transparent). |
| Scene_2. Callout_speech_rectangle |
Component: Shapes | 2D | Callouts | Callout_speech_rectangleExpanded the component and hand modified the callout position of Callout_speech_rectangle.callout using the Subselection tool. |
| Scene_2. Button_glossy_pill |
Component: Buttons | Pushbutton | Button_glossy_pillModified to goto first scene on press. (Parameter Event Goto) |
Additional Help and Download Locations
The components are described in detail in our component help online manual. The links are given below:
Quiz_MultipleChoiceQuestion
Quiz_MultipleChoiceQuestions
These components will work with SWiSH Max3 with build dates of 20091130 or later, and although the components are not included with the 20091130 build’s installer, they can be download here.
After downloading, extract all files within the zip file to:
C:\Program Files\SWiSH Max3\Components\Utility
Note that the exact location may be different depending on where you installed Max3 or miniMax3.
The components will also be included with future versions of Max3 and miniMax3 within the Utility component group.
I hope you find these components a useful addition to Max3 and miniMax3
Update 24 Feb 2010
The original version of the components were found to have faulty links to the help file. Those links have been fixed and the revised components (version 20100224) are now attached to this blog post.
Tags: exam, multiple choice, quiz, test


(2 votes, average: 4.00 out of 5)
Great addition to the SM3 library! I was just looking for this for a client. You folks are doing a great job with the recent iterations of SwishMax, and I’m very happy to be a continuing customer.
from above “Additional Help and Download Locations
The components are described in detail in our component help online manual. The links are given below:
Quiz_MultipleChoiceQuestion
Quiz_MultipleChoiceQuestions”
links show “404 Not Found”
thanks for the components will be trying to incorporate in my next quiz
Sorry, there was a problem with the links. I think it is now fixed. Thanks for pointing this out.