Buttons in a moving movieclip

Hi sorry to ask this as it is probably very easy.

I am trying to create a menu system for a web site in Flash MX 2004, it is going to be a series of coloured bars with a button on each which will take you to diiferent parts of the site.

Each bar is a movieclip, which has a button embed in it, this all works fine if the bars are left static, you can navigate ronud the site. However I would like the bars to slide in from the side of the screen. I can get the movement to work, but once I move the bars the buttons stop responding.

Any Ideas??

Welcome to the forums nibushi ! :slight_smile:

Can you show us what you are talking about ? An example would clear up a lot :slight_smile:

i have managed to get the menu bars to do what i wanted them to do and can now navigate to different parts of my movie, but i still think that i am doing something wrong.

On the stage i have a moviclip called test_mc, within which is a button named biog_btn. Test_mc is supposed to move across the stage when the user creates an onRollOver. Below is the code that i now have to make this work.

test_mc.biog_btn.onRollOver = function(){
this._parent.onEnterFrame = function(){
if(this._x <= 200){
this._x = (50 - this._x)/5;
}
};
};
test_mc.biog_btn.onRelease = function(){
gotoAndStop(“Biog”);
};

To fix my original problem I moved the rollover function to the button instead of it’s parent movieclip. Then use paths to move the movieclip. This now gives me the functionality that i want, but why wouldn’t it work with the onRollOver function being attached to the MovieClip??

Any help would be appreciated to help a confused mind!!:hangover:

Ah yes, that’s a common problem: because there already is an onRollOver handler on the movieclip, the one of the button inside it is ignored. When you want to rollOver the button inside the movieclip, the movieclip is rolled over first. That’s why the button’s rollOver is ignored. [size=1]The enter button on this computer seems to be broke, so I have to write without returns[/size] Your solution fixed this problem, because it doesn’t use the rollOver of the movieclip anymore to make it ease. :slight_smile:

Cheers, at least that is something that i now know to avoid, cheers for looking at my problem!!:thumb:

Anytime :slight_smile: