Skip to main content
July 20, 2006
Answered

Horizontal Sliding Menu Loop

  • July 20, 2006
  • 1 reply
  • 273 views
Hi,

I have a horizontal sliding menu that works how I want it to except that I'd like to have it loop and appear continuous left and right instead of stopping when it gets to the end of the buttons on the left and right. What's the best way to modify the script below to make it continue left or right depending on the mouse direction so that it loops and starts over? I know that if I remove the if statement that it will keep going left or right, but how do I make the clip repeat so that it doesn't fly off stage? Duplicate movieclip and try to position it? I see this done on a lot of sites, but I'm not sure how they do it. I can provide the FLA as well if that helps.

Thanks!

onClipEvent (enterFrame) {
direction = (320-_root._xmouse)/30;
if (((this._x>=700) && (direction>0)) || ((this._x<=-805) && (direction<0))) {
direction = 0;
}
this._x = this._x+direction;
}

This topic has been closed for replies.
Correct answer aniebel
I like this tutorial:

click here to see link

1 reply

aniebelCorrect answer
Inspiring
July 20, 2006
I like this tutorial:

click here to see link
July 20, 2006
Thank you so much for the advice! It took me minutes to make that work. That's a great turorial. Very very simple and he explains it so well.

Thanks again!
Inspiring
July 20, 2006
You're welcome... glad I could help!