1 Reply Latest reply on Nov 30, 2006 2:50 AM by tegnegi

    Mouseover Actionscript - or should I use java?

      What I'm trying to acheive seems fairly simple, so I'm not sure why I feel so lost. Just one of those days I suppose.

      My goal is to have an invisable horizontal menu (6 buttons) appear when the cursor approachs it.

      For example, whenever the mouse is within 250 px of the menu, the menu appears. When the mouse moves away, the menu dissappears.

      For mouseover, I'd love to determain the hit area by the x/y position of the cursor on the screen or by its proximity to the menu I want to appear.

      Is this best done with actionscript or javascript? Any suggestions regarding the best way to approach this?

      The closest I've come is with a 2 frame movie - - rollover = goto and play frame 2 (menu appears) / rollout = goto and stop frame 1 (menu disappears). This kind of works, but is jittery and unstable. Would love to find a better way! Thanks for any suggestions you might have.
        • 1. Re: Mouseover Actionscript - or should I use java?
          tegnegi Level 1
          try the following action script code .. put it in frame coz its a frame script and not movie clip or button action script..there is no need to make two frame movie ..however i m not aware of ur movie structure so ur in a best position to determine that and also that such things as u ve suggested can b easly done in action script

          var mymouse:Object = new Object();
          mymouse.onMouseMove = function() {
          if (_root._ymouse>100) {
          _root.menu._visible = false;
          } else {
          _root.menu._visible = true;

          here menu is a movie clip containing the six buttons of ur menu..U can customise teh value of _ymouse as per ur need..