3 Replies Latest reply on Jul 20, 2006 5:47 AM by aniebel

    Horizontal Sliding Menu Loop

    yevri
      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;
      }