5 Replies Latest reply on Jul 25, 2006 8:23 AM by kglad

    Horizontal Menu with Vertical y axis too

    yevri
      Hi,

      I have a horizontal menu that is working great except for two things:

      1. I want to make it scroll slowly when users don't have their cursor over it or vertically near it, but faster when they get near it vertically or the cursor is over the object. So I'm thinking if I use the _y property that would work.

      2. The graphic that is being scrolled horizontally gets a little wobbly in the spot that is the 0 point (x and y) of the movieclip. As it slides slowly, it wobbles like it is slow to redraw.

      The script for the object is below. Everything works except the if then statement with the _y and speed info near the bottom. The menu is positioned at x=-50 and y=460 and it is 3155 pixels wide x 102 pixels tall.

      Thanks!

      onClipEvent (load)
      {
      xcenter=400;
      speed=1/200;

      }
      onClipEvent (enterFrame)
      {
      var distance=xcenter-_root._xmouse;
      _x+=(distance*speed);
      if (_x > 0) _x=-1550;
      if (_x < -1550) _x=0;
      if (_y < 200) speed=1/200;
      else
      speed=1/80;
      }