2 Replies Latest reply on Dec 16, 2013 12:11 PM by ekfuhrmann

    Way to disable action if another action is executed


      I'm new to both Edge Animate and Javascript/Jquerey so please bare with me if I don't explain this well or with the correct terminology.


      Basically what I am trying to do is have a page where when you scroll over a div/symbol, it expands (using the mouseenter action) and then contracts (mouseleave action).  I can get this animation to work... sort of - it hiccups when you move the mouse quickly over it, causing the animations to sometimes lock in the wrong state, but the problem I have though, is when I try to add a click to the div.


      The idea, in a nutshell, is that when you click on the image, everything on the page fades away and then new content comes in without needing to reload the page.  The thing is, everytime the content begins to fade or hide after the click is executed, the "mouseleave" action on the div triggers, resetting the page.


      So long story short, is there a way to make a div click disregard all other actions while an animation is going on?  I have tried multiple "workarounds" but none of them are great nor are they real easy.


      In addition if anyone has any suggestions or advice on making the rollover and off animations not get stuck occasionally when you move the mouse quickly over it, I would also really appreciate that.





        • 1. Re: Way to disable action if another action is executed
          elainecc Adobe Employee

          Hi, Eric-


          You might want to try saving states using variables.  This is a technique I described in my blog post from last year about leveraging independent timelines.  Search for "state management":




          Hope that helps!



          • 2. Re: Way to disable action if another action is executed
            ekfuhrmann Level 1

            EDIT: I actually realized that my problem is solved by simply just creating symbols and editing the items from within their own timeline. 


            For anyone having a similar issue to myself, you can simply make a symbol out of the button/item you wish to add the rollover to.  From within that timeline animate it appropriately and create play labels from within that items timeline.  Once done with animating the rollover, you can go back to the main timeline and give the symbol of that item a click action.  Your rollover animations are saved within the symbol and then the symbol itself has the click tied to it.  You should now be able to click the symbol without it affecting the rollover animations.


            Thanks Elaine,


            I followed the guide and I think it may very well be what I am looking for, I just need to work on getting a better understanding of the coding to work with my project


            Would you mind showing me the coding you would use for a click action to not use a "mouseleave" action if clicked?


            Lastly, I noticed in your following code string that you do not quote "current" in one of the brackets.  Adding quotes to that word actually seems to break the animation.  Could you explain why you sometimes use quotes and sometimes do not?

            var current = sym.getVariable("current");

            if (current != "") {




            else {



            sym.setVariable("current", "blue");



            Thank you so much!