I have three MCs and three buttons. The MCs have four frames each. I want the mouse overs to make each clip advance one frame to 2 and stay. If they click, I want it to go to frame 3. If they mouse out and then mouse over again, I want it to stay on frame 3. I wanted to use the following code to advance one frame only if it was the first mouse over. It doesn’t work.
This is the code for one button…
var correct = 0;
var wronga =0;
var checka =0;
var wrongb =0;
var checkb =0;
correct_btn1.addEventListener(MouseEvent.MOUSE_OVER, pop1);
function pop1(event: MouseEvent): void {
correct ++;
if (correct ==1){
correct_mc1.nextFrame();
}
}
correct_btn1.addEventListener(MouseEvent.MOUSE_DOWN, correct1);
function correct1(event: MouseEvent): void {
correct = 1;
if (correct ==1){
correct_mc1.nextFrame();
wrong_mc1.gotoAndStop(1);
wrong_mc2.gotoAndStop(1);
}
}
correct_btn1.addEventListener(MouseEvent.MOUSE_OUT, out1);
function out1(event: MouseEvent): void {
correct = 0;
checka = 0;
wronga = 0;
checkb = 0;
wrongb = 0;
}
Thanks in advance!