1 Reply Latest reply on Aug 26, 2009 10:37 AM by kglad

    Scroll over menu - I need it to activate only on rollover. Any ideas?

    Ryan039

      Hi all. I have a scroll over menu that works great (see code below) But I only want it to work when I scroll over the menu. Right now, it activates and scrolls even when I'm not hovering over the menu. My canvas is about 800x400 and the scroll over menu is only 200x350. I tried: on rollover disable but that did not work.

      Any ideas? Please help! Thanks,


      Quote:

      stop();

      ym = 5;
      //function to set the xpos of the movieclip
      function ypos(bar_length, mul) {
      hpos = 0;
      scroll_length = 140;
      incr = bar_length/scroll_length;
      ym = _ymouse;

      if (_ymouse<=80) {
      ym = 80;
      }

      if (_ymouse>=200) {
      ym = 200;
      }

      scroll_y = hpos-ym;

      scroll_y = scroll_y*mul;

      y_pos = scroll_y*incr;

      y_pos = y_pos+hpos;

      return y_pos;

      }

      _root.onEnterFrame = function() {

      // call function xpos
      y_pos = ypos(600, .20);
      with (bar) {
      _y += (y_pos-_y)*.4;
      }

      // call function xpos
      y_pos = ypos(208, .75);
      with (menu) {
      _y += (y_pos-_y)*.3;
      }
      };