Index > Teachers Animation Toolkit > Quiz > Bounce Quiz

As you can see in the example below, objects fall and are dragged by the user into the appropriate category. There are three degrees of difficulty and the aim is to drag a given target number to the correct destinations.




Download the bounce example flash document

Start by thinking of a quiz relevant to your own subject. The instructions below take you through how to adapt the Flash document to your own context.


Changing the number of the answers


The quiz template is set up as a true / false quiz i.e. with two answers, however, you can have as many as you like (until you start to run out of room on the screen).

  1. The code deals with any answer targets on the stage automatically so go to the library (F11 toggles the window on and off) and duplicate one of the existing target movie clips (e.g. answer1). Make sure that you rename the duplicate (e.g. answer3) and that the movie clip behavior is selected before you click on OK.

  2. Edit the new answer movie clip in the library by double-clicking on it in the library list.

  3. Alter the text layer to display the answer it represents. You might need to alter the size of the text box or font.

  4. You might find that the clip isn't big enough to contain the answer text or that a ball shape isn't appropriate. Don't change the background in the movie clip. Instead, edit the background movie clip in the library so that all the bouncing answers are consistent.

  5. Back in the answer movie clip, you can alter the colour of the background individually by clicking on the movie clip on the background layer and then editing its tint property in the color section of the properties window.

  6. Drag the new answer movie clip onto the stage. It doesn't matter where you put it since its starting position will be set by the code. Name the instance using the same convention (e.g. answer3) so that the code can find it.

  1. In the code on frame 1 of the scripts layer, scroll down to find this bit of code.

    answers[1].tag = "true";
    answers[2].tag = "false";

  2. Edit the values of each variable so that each one is the answer shown on the clip.

    answers[1].tag = "verb";
    answers[2].tag = "noun";

    answers[3].tag = "adjective";

Changing the questions

  1. Find this bit of code. It defines an array of variables containing the question text and the answers.

    var item1 = ["The moon is made of cheese","false"];
    var item2 = ["Pluto is a planet","false"];
    var item3 = ["Jupiter is a gas giant","true"];
    var item4 = ["Mercury is the nearest planet to the sun","true"];
    var item5 = ["Jupiter has the biggest gravitational field","true"];
    var item6 = ["Mars is bigger than the earth","false"];
    var item7 = ["There is water on Mars","true"];
    var item8 = ["The moon is a satellite","true"];
    var item9 = ["Venus has an atmosphere","true"];
    var item10 = ["Our nearest star is Betelgeuse","false"];
    var items = [item1,item2,item3,item4,item5,item6,item7,item8,item9,item10];

  2. Edit the items between the square brackets. The first part (e.g. "The moon... ") is the question or statement displayed in the text box at the bottom of the screen and the second part (e.g. "false") is the answer corresponding to one of the bouncing answer objects.

  3. If you want to add more objects, add them to the bottom of the list, making sure that you name the items properly (item11 etc). You can have less items by deleting from the bottom (item10 upwards).

  4. If you have added or removed items you must finish by editing the final part of the statement e.g.

    var items = [item1,item2,item3,item4,item5,item6,item7,item8,item9,item10,item11,item12];


    var items = [item1,item2,item3,item4,item5,item6];

  5. Note that these questions are selected randomly by the movie and so some will be repeated as it runs.

Altering the comments


If you scroll down through the code, you will find the various pieces of text that provide feedback as the game runs.


Each has the format - variableName = "Piece of text to be displayed";


The variables are given in the list below.


var openingComment = "Click on True or False";
var correctComment = "Well Done!";
var wrongComment = "Hard Luck!";
var readyComment = "Get ready...";
var finishComment = "Well Done - You have completed the game.";


Put whatever you like between the quotes and it will be displayed in the dynamic text box at the top of the playing area. This is probably the best way to find out the job that each does in the movie.


Editing the three levels of difficulty

  1. Look for the function called setLevel().

  2. It has three sections, each between a pair of curly brackets ({}). These sections contain sets of variables that determine how the level runs. You alter the values of the variables to change the level of difficulty.

  3. Here are the variables and what they do in red.

    intervalTime = 2000; the time delay before the next question is displayed in milliseconds
    swapTargets = true;
    if the bouncing answers swap positions during play
    swapTargetTime = 1000;
    the time delay before the answers swap places in milliseconds
    speed = 500;
    the speed that the bouncing answers move inside their bounding box
    maxQ = 20;
    the number of questions that are asked each game
    subtract = true;
    if the movie should subtract 1 for a wrong answer

  4. Try some different settings and test the movie to see their effect. The settings in the template are definitely not appropriate and need testing with a real whiteboard on some real students!