Skip to main content
Participating Frequently
January 17, 2017
Question

connect the questions with the answers game

  • January 17, 2017
  • 2 replies
  • 261 views

i want to make a quiz where the user must connect the answers with the questions using a straight line using AS3. 

1- how can i let the user draw a straight line between the question and answers?

2-what is the code for the right and wrong answers?

This topic has been closed for replies.

2 replies

Inspiring
January 17, 2017

I'm afraid the answer to your question is too complicated to answer it here on the forum unless you are asking us to write the entire programme for you. I think as a beginner programmer you should first understand the AS3 basics then dive into complicated interactions. Here's a tutorial about drawing with mouse pointer https://www.youtube.com/watch?v=EqKQUZLzZ98     If you know what you are doing you should be able to figure out what parts you need. As for right and wrong answers, it's a simple "if" function where you compare the answers given to the answer that is correct. Detecting what answer was lined to which question is a different story and I'm afraid it's beyond me.

I can however suggest a different solution where instead of drawing a line, you drag and drop answers onto the questions. Here's a tutorial Drag and Drop Puzzle Flash Game for Kids - YouTube . It's easier to detect which movie clip was moved into which position and you can test them for correctness.

kglad
Community Expert
Community Expert
January 17, 2017

1. use the graphics class'es lineTo and moveTo methods.

2. i don't understand your question.