PDA

View Full Version : Roll Over, Roll Out!


bigjimmo
12-17-2002, 01:40 PM
On my home page I have these buttons hidden behide a line, the the mouse goes over them they unfold out, when the mouse moves away they fold in again. This all works fine when the mouse moves over the buttons slowly but if you put the mouse over the button and move it away before the button movie clip has finished, the button gets stuck open. Is there any action script I can add to prevent this.

The Action script I am using at the moment is:-

on (rollOver) {
_root.home_button.gotoAndPlay(2);
_root.Button_Home = "Home";
}
on (rollOut) {
_root.home_button.gotoAndPlay(5);
}

Thanks

Jim

Ricod
12-18-2002, 05:19 PM
You could perhaps make a little function that checks the position of the mouse, using the _xmouse and _ymouse variables, and if it doesn't correspond with the buttons, it should check if there's an mc thats 'unfolded' and if so, fold it. Might be a bit 'over the top' tough. You could also opt for a giant button behind the small buttons that when you roll over that one, it folds everything.

Maybe someone else has a better solution ...