2 Replies Latest reply on May 5, 2017 12:42 PM by AquariusCZ

    Creating website in Ae - Triggers problem

    AquariusCZ Level 1

      Hi,

       

      i am having problem with elements on website.

      For example element "Back to homepage" influence element that should not. (i know why its happening, but dont know how to prevent that)

       

      Basicly what i want to do is:

      Switch picture of HP, for drink animation - when i click on little thumb at right side. Then disable thumb that triggers it and enable thumb for HP.

      On mouse over, On mouse out are problem too. Because this actions carry result of previous animation.

       

      Hope it makes at least little sense

       

      Link on website:

      http://worldofaquarius.com/~Aquarius/malibu/malibu.html

        • 1. Re: Creating website in Ae - Triggers problem
          resdesign Adobe Community Professional & MVP

          In order to able and disable events, the easiest way is to set flags.

           

          Example:

           

          In your event use the condition and reset it.

          you could have this on stage/compositionReady

           

          var active = 1;    // creates a variable to check

          // below is code for thumb button

          sym.$("YourThumbbuttonName").bind("mouseover", function(){

               if (active == 1) {

                         // do something - change image in your case - will not occur is active is set to 0 so you disable the action by make active = 0

                         active = 0;   // the event now cannot occur

                }

          });

           

          Now you will need another event to reset your variable somewhere else but in general when you page loads the variable will be 1.

           

          If you want to reset it somewhere else you can do that too.

           

          sym.$("anotherbutton").bind("click",function(){

              active = 1;

          });

          • 2. Re: Creating website in Ae - Triggers problem
            AquariusCZ Level 1

            Thank you so very much :-)