0 Replies Latest reply on Aug 28, 2014 12:02 AM by VideAlta

    Bypass stop with if statement on mouseenter or mouseleave?

    VideAlta Level 1

      Hello,

       

      I am new to Edge Animate and JavaScript. I spent quite a bit of time trying to find a solution but I am stuck...

       

      http://www.alligatorvideo.com/edge-test-1/index2.html

       

      This projects behaves almost like I would like it to:

       

      When the mouse enters the left disc, the board goes down on the left.

      When the mouse enters the right disc, the board goes down on the right.

      When the mouse is no not over any disc, the board returns to flat.

       

      If you leave time to the board to return to flat before you enter the disc opposite to the one you just left, it works fine.

       

      Problem is... if you enter the disc opposite to the one you just left before the board has returned to flat, then the board will not pass the flat point and it will get stuck on one side.

       

      At some point I will also add the touchstart and touchend, that's why I chose mouseenter and mouseleave.

       

      Any help would be greatly appreciated!

       

      Jerome