4 Replies Latest reply on Feb 20, 2014 6:23 AM by santonicolor

    Rollover Issue

    santonicolor

      Hello,

       

      I have some buttons with rollover working. When you "Mouse Over" the button plays form a label "Over" and when "Mouse Leave" the button plays from label "Out".

      The issue is that if I move the mouse very quickly over and out, the button stays on the last frame of "Over" and does not go back to the "Out" state.

       

      Here is the link: http://ronvegafitness.com/2014/index.html

       

      Thanks for your help

        • 1. Re: Rollover Issue
          elainecc Adobe Employee

          Hi, santonicolor-

           

          Just a couple of notes here.  You'll probably want to use mouseenter instead of mouseover, as the mouseover event will fire when you move the mouse.  The other thing is that moving the mouseleave event not firing if the mouse moves too quickly is a known issue both mouseout and mouseleave; these are respectively JavaScript and jQuery APIs that we reference and do not control their behavior.

           

          Hope that helps,

           

          -Elaine

          1 person found this helpful
          • 2. Re: Rollover Issue
            santonicolor Level 1

            Thanks!

            • 3. Re: Rollover Issue
              Zaxist Level 4

              you should have all four actions : mouseenter, mouseleave, mouseover, mouseout to prevent this problem from happening

               

              write what you have on mouseover into mouseenter and write what you have on mouseout into mouseleave

               

              then you can see your problem is gone

               

              Zaxist

              1 person found this helpful
              • 4. Re: Rollover Issue
                santonicolor Level 1

                Zaxist,

                 

                Thanks for your suggestion, it's working now. But I also had to change the way I had the actions. At first, I had the "mouse" action applied to the time line of the buttons. This action were playing from different labels depending on the mouse state. Then I had the buttons animated on the stage with the click action applied. That did not work properly even when adding the four mouse actions. Now that I have apply the mouse actions on the stage with the getSymbol fucntion, everything works fine.

                 

                Here is how I have it working:

                 

                1.Each button has animation for the rollover effect but no "mouse" action applied in the timeline. Only a stop action at the beginning and end of the timeline.

                2.At the stage each button is animated with this action for the "mouseenter" and "mouseover": sym.getSymbol('TrainingButton').play();

                3. This action applied to the "mouseleave" and "mouseout": sym.getSymbol("TrainingButton").playReverse();

                4. Then the click action, in this case: window.open("http://www.ronvegafitness.com/2014/training", "_parent");

                 

                I'm publishing the animation and importing it in Muse.

                 

                Thanks for your help!