Applying an actionscript to a movie clip killed its buttons

I am nearing completion of week 1 of my crash course in Flash. I figured out how to make easing menus w/ rollover / rollout but now that i’ve applied the actionscript to the menu the button states on the easing menu no longer work … what do I do to fix this ?

THE CODE I HAVE ON THE MOVIE CLIP:
onClipEvent (load) {
_x = 20;
speed = 5;
}
onClipEvent (enterFrame) {
_x += (endX-_x)/speed;
}

on (RollOver) {
endX = 211;
}

on (RollOut) {
endX = 20;
}

If you apply an onRollOver handler to a movieclip that has buttons inside it, the button won’t work anymore. Instead, you can use a hitTest inside the onEnterFrame handler to check if the mouse is over the current movieclip. That way, the buttons will still work.

could you explain that a little more? sample script?

For example …


onClipEvent (load) {
_x = 20;
speed = 5;
endX=20;
}
onClipEvent (enterFrame) {
_x += (endX-_x)/speed;
if(this.hitTest(_root._xmouse,_root._ymouse)){
endX = 211;
} else {
endX=20;
}
}

:slight_smile:

WooHoo, it worked. Thanks

No problem :slight_smile: