think of this as a 'drag and drop game'. you can see a real simple example of this in action
here
the code that makes this work:
red.addEventListener(MouseEvent.MOUSE_DOWN, beginDrag);
blue.addEventListener(MouseEvent.MOUSE_DOWN, beginDrag);
red.addEventListener(MouseEvent.MOUSE_UP, endDrag);
blue.addEventListener(MouseEvent.MOUSE_UP, endDrag);
function beginDrag(e:MouseEvent):void {
e.target.startDrag();
answer.text="";
}
function endDrag(e:MouseEvent):void {
e.target.stopDrag();
if (e.target==red && red.hitTestObject(hit1)){answer.text="correct !";}
else if (e.target==red && red.hitTestObject(hit2)){answer.text="wrong. try again !";}
if (e.target==blue && blue.hitTestObject(hit2)){answer.text="correct !";}
else if (e.target==blue && blue.hitTestObject(hit1)){answer.text="wrong. try again !";}
}
the red and blue squares on the bottom (movieclips named ;'red' and 'blue' ), need to be dragged and dropped onto the correct hitTest movieclip ( the grey squares named 'hit1' and 'hit2' ) the dynamic text box named 'answer' will change the response accordingly, and is voided upon the initiation of the next drag
i hope that helps out.