MC animation onRollOver problem

Hi,

I’ve got a movieclip that is acting as a button. When the mouse rolls over the button and animation (alpha fade in) runs when the mouse rolls out another animation runs (alpha fade out). Problem is the animation will freeze and not finish if the mouse is rolled out before the roll over animation is complete.

How can I get the full over and out to run regardless of removing the mouse before over is complete?

Code is…

for the mc…

[AS]next_mc.onRollOver = function() {
this.gotoAndPlay(“over”);
}
next_mc.onRollOut = function() {
this.gotoAndPlay(“out”);
}[/AS]

in the mc there is a lable layer with over and out and alpha tweens for each.

Not sure if this is clear but any suggestions would be helpful.

Fed

Hey,

Your code looks ok, but I can’t tell where the problem may be without the file.

check the forums for the hitTest() function, much better than the rollOvers that only work 5 out of 6 times =)

You can use flag varialbles to check whether movie header has started from one frame to another. Pls add x = 1; in the first frame of the movie and add x =2; in the next frame of the movie where the movie is about to stop. Moreover u can check using

//This comes in the onRollOver call back function

if (x ==1){
do some thing.
}else if (x ==2) {
do something

}

this way u can track what is up inthe movie. Probably the next event occured before the completion of previus one.

That is why movie is not respoding. Hope u can do it.

abhilash
}