"If" on MC button?

So i have this bit of code that triggers a bunch of stuff on a buttons over/out/down etc… I also have a variable on the _root time line that declares a clicked variable so i can keep track of the buttons click state.

Ok so now the trouble…

Im changing my (working) buttons to movieclip buttons to take advantage of the MC properties (ie. goToPlay - etc… ). But this screws up my working AS and im not sure why? In particular the “if” statement that keeps track of the clicked variable does not seem to be functioning.

Is there a problem putting if statement on a MC button?
How do i fix this?

Here is the code i’m using on my MC button:


on (rollOver) {
if (clicked == false) {
_root.mainVar = 70;
}
this.gotoAndPlay(“over”);
_root.fg_mc.eyes.hit.onRollOver();
}

on (rollOut) {
if (clicked == false && _root.mainVar == 70) {
_root.mainVar = 0;
}
_root.fg_mc.eyes.hit.onRollOut();
gotoAndPlay(“up”);
}

on (press) {
gotoAndPlay(“down”);
}

on (release, releaseOutside) {
this.gotoAndPlay(“over”);
_root.fg_mc.eyes.hit.onRelease();
}


Here is the code i used on my regulare button - if statement functions fine?

on (rollOver) {
if (clicked == false) {
_root.mainVar = 70;
}
_root.fg_mc.eyes.hit.onRollOver();
}

on (rollOut) {
if (clicked == false && _root.mainVar == 70) {
_root.mainVar = 0;
}
_root.fg_mc.eyes.hit.onRollOut();
}

on (release, releaseOutside) {
_root.fg_mc.eyes.hit.onRelease();
}

Thanks All!