I took the "Create the Infinite Menu" tutorial and figured out how to redo the code so it uses functions with an onEnterFrame instead of having everything in the onClipEvent. I did this so I could turn off the scrolling after a button is clicked. (the menu tweens to another part of the page and stops scrolling)
Now my issue is that in order for my ActionScripted menu buttons to work I have to have 2 instance names of the movieclip that holds my navigation buttons in the infinite menu. Which means I have to have 2 of everything for my buttons! Is there anyway to accomplish this menu without having 2 separate instances of the menu clip so the same path to my button events would work no matter what part of the menu clip happens to be on the stage at that moment?
Here’s what I did:
var xcenter = 1000;
var speed = 75;
menuScrollSpeed = function () {
var distance = _root._xmouse - xcenter;
this._x += (distance / speed);
};
menuDuplicate = function () {
var distance = _root._xmouse - xcenter;
var endX = _root._xmouse;
this._x += (endX - this._x) / speed;
this._x += (distance / speed);
if (this._x > 0) {
this._x = -800;
}
if (this._x < -800) {
this._x = 0;
}
};
mainMenu_mc.onEnterFrame = menuScrollSpeed;
mainMenu_mc.onEnterFrame = menuDuplicate;
and I’m a newbie, so please speak slowly! :beam: