Groups | Blog | Home
all groups > flash actionscript > october 2006 >

flash actionscript : menu stay


dzedward
10/19/2006 10:30:31 PM
when you roll over a button, and a menu slides down, how do you get the menu to
stay when your mouse is trying to pick something from the menu? My menu
(bar_mc) is a sliding movie clip..here's the script
my_btn.onRollOver = function(){
trace(bar_mc.gotoAndPlay(2));
}
my_btn.onRollOut = function(){
trace(bar_mc.gotoAndPlay(17));
}

how do i make it stay down when i try and select something on the menu
(bar_mc)?
TimSymons
10/20/2006 2:43:05 PM
You have to increase the hitArea of the button to cover the new exposed portion
of the menu. You can use the hitArea proptery of the movieclip to change it
when your menu is down versus when it is up.

You will have to define 2 other movieclips to act as your hitAreas for your
menu. One that is the hitArea when the menu is up (about the size of the
button) and the other when the menu is down (one that will cover the same area
as the button and menu together).

Tim
AddThis Social Bookmark Button