I’ve created an infinite menu for my site based on the Kirupa tutorial. However, when the menu scrolls past the specified points in the actionScript, it appears to “jump” back to the beginning of the menu. It doesn’t look like it is continuoulsy scrolling. Does anyone know what I’m doing wrong?
Thanks, electrongeek. I see the changes in the action script. If you have a moment, could you please explain why you made the changes? I’m trying to understand what I did wrong. Thanks again.
Sure, I’ll try to explain it. This is the new script after my adjustments.[AS]onClipEvent (load) {
xcenter = 400;
speed = 1/130;
}
onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
_x += (distancespeed);
}
onClipEvent (enterFrame) {
var distance = _root._xmouse-xcenter;
_x += (distancespeed);
if (_x>0) {
_x = -616;
}
if (_x<-616) {
_x = 0;
}
}[/AS]
The 400 change on the xcenter basically determine how the menu is going to scroll left or right relative to the mouse position. That was just a minor change from your 540 which wasn’t the problem why there was a jump.
The cause of the jump was where I placed 616, which is the width of your menu or the width of the MC that holds those images. It was more like 615.9 so I rounded it up to 616. I forgot what you had there before, but it was way off.
I also had to go inside the menu and nudge it to the right to compensate for the new numbers as well.
So basically you stated the wrong width so things were all screwy. I hope that clears things up. =)
Ohhhhhhhh K. Electron geek, I’m sure you can field this one. Now I am trying to make so clicking on a pic brings up info on the site. Each pic has an instance name and the movie clip I want to manipulate has one too. I put the following code on frame two of the main time line but it does not work.
That function isn’t going to work since you nested your buttons in several movieclips so what I did was apply this to your “hifivemom” button itself:[AS]on (release) {
_root.infobox.gotoAndPlay(45);
}[/AS]
You’ll have to do the same to the rest of the buttons. I attached your file again.