1 Reply Latest reply on Nov 17, 2015 5:49 AM by resdesign

    Different paths ways depending on which two buttons they have selected

    196louiseford

      Basically, I have a tick box type of interaction where I would only want the user to press two out of the four buttons to proceed onto the next page. However depending on which two buttons they choose will take you down a different route. Is there anyway of doing this on Edge Animate?

       

       

      Thank you in advance,

       

      Louise

        • 1. Re: Different paths ways depending on which two buttons they have selected
          resdesign Adobe Community Professional & MVP

          Yes, use variables and check them.

          Example

          // initialize your variable here

          var selected1 = 1;

          var selected2 = 1;

           

          On your click event check the variable value and then reset the variable for next clicks.

          // this goes on the 2 first choices

          sym.$("button1").bind('click',function(){

               selected1 = 0;   // your variable is changed to 0 when the conditional checks variable from the 2 button choices

               if(selected1 == 0 && selected2 == 0){

                     // ADD YOUR CODE FOR CLICK EVENT HERE

                      selected1 = 1;  // when you click your variable will be changed to 1

              }

          });

          // this goes for the 2 other choices

          sym.$("button3").bind('click', function(){

                 selected2 = 0;  // your variable is changed to 0 when the conditional checks variable from the 2 button choices

                 if(selected1 == 0 && selected2 == 0){

               // ADD YOUR CODE FOR CLICK EVENT HERE

                selected2 = 1;  // when you click your variable will be changed to 1

                 }

          });