Hello,
I have created menu which has roll over and out animations.
What I am trying to achieve is to play the roll over animation when rolling over the menu, but stop the roll out animation IF the focus has been set on a specific movieclip.
Here’s my code:
function menuOut(e:MouseEvent):void
{
stage.focus == contentMc;
[COLOR=Red]if(stage.focus == contentMc)[/COLOR]{
menuMc.stop();
contentMc.stop();
}
else{
menuMc.gotoAndPlay("out");
contentMc.gotoAndPlay("out");
}
}
I am not sure what I am doing wrong, but if I trace the stage focus inside the if statement nothing happens, but it works if I trace it on else statement(gives null) which means that the if statement is bypassed and the else is played.
Any suggestions?