1 Reply Latest reply on Apr 14, 2015 6:43 PM by jane0022

    Call multiple functions with one click

    cre8ive1974

      I created two functions on the .compositionReady

       

           sym.activateBasicColors=function(){

           do stuff

           }

       

           sym.deactivateSpecialColors=function(){

           do different stuff

           }

       


      I want to trigger both functions with one click however when I add this to the click event on the button..

       

           sym.getComposition().getStage().activateBasicColors();

           sym.getComposition().getStage().deactivateSpecialColors();

       

      I only get the top function to work.  It won't do the 2nd function.

      If I flip the order that the functions are called it will only call the one that is first.

       

      Is there a way to call both functions with one click?

       

      Thanks in advance!

        • 1. Re: Call multiple functions with one click
          jane0022 Level 1

          I have tried your code in Edge Animate CC 2014, and what you want is implement correctly. Both two functions was work.

          sym.function1=function(){

          alert("1");

          }

          sym.function2=function(){

          alert("2");

          }

           

          sym.getComposition().getStage().function1();

          sym.getComposition().getStage().function2();

           

          It alert “1” and “2” .