PDA

View Full Version : Nesting Buttons within Mouseover


idpexec
05-30-2003, 04:07 PM
Hey there,

I'm looking for a way to bring up a small menu when a user mouses over a button.

Basically I have a button that is about 30x30. When the user mouses over that area, the button changes it's size to around 200x200. The hit area also changes to the full 200x200 instead of 30x30.

That part works fine.

On the mouseover frame I have several additional buttons on top of the 200x200 area.

I want the user to be able to mouseover the original button, a larger button is shown, then the user can choose another button.

I tried just placing additional buttons on the over frame of the original button, but when the mouse is close to the addition buttons, the original button starts to flicker and clicking the button has no effect.

Check out the jpg I've included.

pellepiano
05-30-2003, 04:40 PM
You cant do that with a button.
Instead make a movieclip containing the submenu buttons, first frame empty with a stop action. Give it an instance name of sub. Put that on a layer on top of the button on the stage.

On the button...

on(release){
sub.gotoAndStop(2);
}

TYhis will make the sub movieclip go to frame 2 and thus reveal itself.

You can close it by having this action on the submenu buttons

on(release){
//getURL or other actions here
gotoAndStop(1);
}

idpexec
05-30-2003, 05:56 PM
Hey,

Tried your idea - works perfect, only problem is that I'm trying to do this on rollOver not on release. I can get to the larger, menu-like image via on(rollOver) {}, but it seems you can't have overlapping hit areas.

Once I get to the menu-like area, user should be able to select any button on that area. If they rollOut of the menu-like area if should go back to the original state.

Thanks,
WARD

pellepiano
05-30-2003, 06:37 PM
When rollover areas overlap one of the button is to consider it a rollOut. So the easiest way is to not have a rollOut on the main button.
If you want the MC with the submenu to close if the mouse is outside it you can do that with hitTest.Otherwise you can close it when the user clicks one of the sub menu buttons ( as in previous post ).

These submenus actions can be quite tricky.