6 Replies Latest reply on Nov 25, 2013 11:27 AM by Cin3rama

    MouseOver MouseOut Question


      I have an animation I want to play when I mouse over an object, so I have:


      For MouseOver:




      with a symbol of infoCenter1 and a label in the timeline for the show animation of "In"




      For MouseOut:




      using same symbol of infoCenter and a label in the timeline for the hide animation of "Out"



      This works the first time I try but then the next mouse over doesn't work, instead the show animation plays for mouseOut and hide animation plays for mouseOver.   What am I doing wrong?

        • 1. Re: MouseOver MouseOut Question
          TimJaramillo Level 4

          It's hard to tell without looking at your file, but in my experience, "mouseover" and "mouseout" can have weird behavior if your symbol has nested objects. As your mouse moves over the nested objects, it will cause errant "mouseout" events to trigger.


          Instead of "mouseover" and "mouseout", try the "mouseenter" and "mouseleave" events.

          • 2. Re: MouseOver MouseOut Question
            AliNitro Level 1

            I have also tried mouseenter and mouseleave, but I don't think that is making a difference.  I have ALSO tried onClick with In / Out on my timeline.  I figure I can just sym.play(); and it'll play the next section of the timeline. 


            The problem I'm facing with mouseenter/mouseleave mousein/mouseout  or onclick is that the animation seems to think there's 3 states to my timeline "In" "Out" and Do Nothing(?)  so if the actions are:



            1 mouseOver = plays "In"

            2 mouseOut = plays "Out"

            3 mouseOver = plays nothing

            4 mouseOut = plays "In"




            1 onClick = plays "In"

            2 onClick = plays "Out"

            3 onClick = plays nothing

            4 onClick = plays "In"



            the onClick isn't as bad an outcome because you can just click twice, but I want to know why it's happening.  Let me know if I need to share my files and I'll put them up on db.


            Sorry if this is confusing!

            • 3. Re: MouseOver MouseOut Question
              TimJaramillo Level 4

              Yep, sharing your files will definitely get you a resolution to your issue!

              • 4. Re: MouseOver MouseOut Question
                AliNitro Level 1

                Link to files is here




                The red dots have tool tips that come up.  Top left I tried to do mouseOver / mouseOut  the bottom left is onClick.


                Thanks for the help!

                • 5. Re: MouseOver MouseOut Question
                  elainecc Adobe Employee

                  Hi, AliNitro-


                  It looks like the ZIP file is invalid.  Can you reupload?





                  • 6. Re: MouseOver MouseOut Question

                    I had a similar problem.  I needed to apply motion to an image to do a revel of some links and other info.  I tried a delay to the image timeline and it helped but any movement in the mouse, even when it was still in the div, caused the playreverse() to fire making motion jerky.  Basically I drew a rectangle below the image and gave it keyframes in the same location as the image (same delay too), however, I did not appy any motion; just a static rectangle.  I then copied the mouseenter and mouseleave code from the image to the rectangle. It now works well without the jerky unpredictable movements.  I know this is not an elegant solution, a bit of spagetti code, but it worked.


                    Would be interested in seeing something more consise though.