Making an Interactive Quiz in Flash?

  • brittagyrl
  • Novice
  • Novice
  • User avatar
  • Posts: 32
  • Loc: Ogden, Utah

Post 3+ Months Ago

Hello Everyone,

I am currently using Flash CS3, version 9.0 and one of my co-workers would like me to try to recreate something similar to the little Quiz I am attaching below. I have mad e few things using Flash, but I've never created an interactive quiz before. Can anyone give me a good place to start? Helpful advice, etc.?
Attachments:
CallNumberQuiz.png
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • brittagyrl
  • Novice
  • Novice
  • User avatar
  • Posts: 32
  • Loc: Ogden, Utah

Post 3+ Months Ago

The other tutorial she would like to duplicate is this.
Attachments:
  • ScottG
  • Proficient
  • Proficient
  • ScottG
  • Posts: 477

Post 3+ Months Ago

What type of test are you trying to make? from just messing with that tutorial it doesn't check to see if the answer is right unless I'm missing something.

Most test like this use hit test in areas and you use some code to determine the correct answer.

Sorry for the crudeness but this is a simple test I made in in about 5 minutes

The movie is simple a text box with to tell you if you are right or wrong a button that is use to check the answers three draggable movie clips and three drop zone movie clips

The code
ACTIONSCRIPT Code: [ Select ]
// Set the on press functions for the blocks
red_block.onPress = function () {
   
   // Start Drag
   startDrag(this, false);
   
}
 
green_block.onPress = function () {
   
   // Start Drag
   startDrag(this, false);
   
}
 
blue_block.onPress = function () {
   
   // Start Drag
   startDrag(this, false);
   
}
 
// Set the on release funtions for the blocks
red_block.onRelease = red_block.onReleaseOutside = function() {
   
   // Stop the drag
   this.stopDrag();
   
}
 
green_block.onRelease = green_block.onReleaseOutside = function() {
   
   // Stop the drag
   this.stopDrag();
   
}
 
blue_block.onRelease = blue_block.onReleaseOutside = function() {
   
   // Stop the drag
   this.stopDrag();
   
}
 
// Set up the check button
check_button.onRelease = function() {
   
   // Set a flag to true
   var all_right:Boolean = true;
   
   // Check for the correct answer
   if(!zone_1.hitTest(blue_block._x,blue_block._y)) {
     
      // Set the flag to false
      all_right = false;
     
   }
   
   // Check for the correct answer
   if(!zone_2.hitTest(red_block._x,red_block._y)) {
     
      // Set the flag to false
      all_right = false;
     
   }
   
   // Check for the correct answer
   if(!zone_3.hitTest(green_block._x,green_block._y)) {
     
      // Set the flag to false
      all_right = false;
     
   }
   
   // Check to see if all_right is still true
   if(all_right) {
      results.text = 'Correct';
   } else {
      results.text = 'Try Again';
   }
     
   
}
  1. // Set the on press functions for the blocks
  2. red_block.onPress = function () {
  3.    
  4.    // Start Drag
  5.    startDrag(this, false);
  6.    
  7. }
  8.  
  9. green_block.onPress = function () {
  10.    
  11.    // Start Drag
  12.    startDrag(this, false);
  13.    
  14. }
  15.  
  16. blue_block.onPress = function () {
  17.    
  18.    // Start Drag
  19.    startDrag(this, false);
  20.    
  21. }
  22.  
  23. // Set the on release funtions for the blocks
  24. red_block.onRelease = red_block.onReleaseOutside = function() {
  25.    
  26.    // Stop the drag
  27.    this.stopDrag();
  28.    
  29. }
  30.  
  31. green_block.onRelease = green_block.onReleaseOutside = function() {
  32.    
  33.    // Stop the drag
  34.    this.stopDrag();
  35.    
  36. }
  37.  
  38. blue_block.onRelease = blue_block.onReleaseOutside = function() {
  39.    
  40.    // Stop the drag
  41.    this.stopDrag();
  42.    
  43. }
  44.  
  45. // Set up the check button
  46. check_button.onRelease = function() {
  47.    
  48.    // Set a flag to true
  49.    var all_right:Boolean = true;
  50.    
  51.    // Check for the correct answer
  52.    if(!zone_1.hitTest(blue_block._x,blue_block._y)) {
  53.      
  54.       // Set the flag to false
  55.       all_right = false;
  56.      
  57.    }
  58.    
  59.    // Check for the correct answer
  60.    if(!zone_2.hitTest(red_block._x,red_block._y)) {
  61.      
  62.       // Set the flag to false
  63.       all_right = false;
  64.      
  65.    }
  66.    
  67.    // Check for the correct answer
  68.    if(!zone_3.hitTest(green_block._x,green_block._y)) {
  69.      
  70.       // Set the flag to false
  71.       all_right = false;
  72.      
  73.    }
  74.    
  75.    // Check to see if all_right is still true
  76.    if(all_right) {
  77.       results.text = 'Correct';
  78.    } else {
  79.       results.text = 'Try Again';
  80.    }
  81.      
  82.    
  83. }
Attachments:
simple_test.zip

(7.24 KiB) Downloaded 516 times

Attachments:

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 15 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.