I have a menu that pops out on rollover and then goes back in on rollout.
The problem is anything placed on the menu either buttons or movieclips do not seem to function any ideas why this happens or how to overcome it?
The structure is as follows
_root
menu_mc (with in/out animation)
menugfx_mc(movieclip that contains the menu bar/buttons)
menu_gfx
buttons
Now the menu goes up and down just fine but the buttons refuse to work
thx
After giving it a try the buttons are now working
Im having trouble getting it to work though, whats the best way to use this function?
This is what im doing at the moment but doesnt seem to work, the menu seems to pop-up at what looks like to me at random x/y cords :S
onClipEvent (enterFrame) {
if (hitTest(_root._xmouse, _root._ymouse, false)) {
this.gotoAndPlay(“menuIn”);
}
}
I basically want it to pop up if the mouse is over the movieclip
The problem is that when the hit test is true every onenterframe your going to play “menuIn”, so your menu_mc will not run properly (ie starts over and over again at “menuIn”) I introduced a new variable, so the if statement is only true one moment, which will run menu_mc.
onClipEvent (load) {
var hit = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse) && !hit) {
this.gotoAndPlay("menuIn");
hit = 1;
} else if (!this.hitTest(_root._xmouse, _root._ymouse) && hit) {
this.gotoAndPlay("menuOut");
hit = 0;
}
}
I didnt declare it on load though, but it works pretty much the same as what you have, wow I feel proud that I did it myself, but thx so much for helping out
One other problem is if someone(myself :P) wanted to annoy the menu by getting my pointer into the region before it gets a chance to finish it remains there with no animation.
Is there anyway to make sure whenever the mouse is in that region the meny stays popped out, or picks up the animation from where it is currently?
I tried searching around for something that would work out where the animation is at present and then continue from that point in the opposite way but no luck