I have a 2 frame movie. It’s basically drag and drop movieclips onto targets and see if they’re correct. When the draggable movie clip is dropped onto the correct movie clip, the user clicks a done button and sees if they got it right or wrong. An if loop is checking which are correct. What I want to do is to assign the correct targets on the first frame and then these will be used to name the variables on the done button.
First frame:
var ans1:Number = 1;
Here’s the code for the button:
on (release) {
//if the draggable object 1 is dropped on the correct target (1)
if (this.Drag1._y == this.Target+_root.ans1._y)
{
//CORRECT, display a correct sign
this.tick0+_root.ans1.gotoAndStop(1);
} else {
//WRONG, display incorrect sign
this.tick0+_root.ans1.gotoAndStop(2);
}
}
I know this is completely wrong, I don’t know how I should do it. Can anyone help a beginner out?