1 Reply Latest reply on Apr 3, 2014 7:28 AM by Sudeshnasarkar27

    Showing "End message" after completed animation loop

    AtWork-Jensen

      Hello World,

       

      I am creating web banners to put on eg. Google where the banners must stop animate after X seconds, that's why your solution helped.

       

      Now.

       

      After the animation looping ends (after eg. 2 loops) I need the banner to jump to a "end message", eg. Book today! - how can I do that?

       

       

      Thanx!

       

      // M.

        • 1. Re: Showing "End message" after completed animation loop
          Sudeshnasarkar27 Adobe Employee

          Hi ,

           

          You can set a variable "count" and increment this each time the animation loops and keep checking its value.

          //on stage compositionready

          sym.setVariable("count" , 0);

           

          Trigger action at the end of the animation for setting loop

          var c= sym.getVariable("count");

          if(c < 1)

          {

          //looping to continue

                    c=c+1;

                    sym.setVariable("count" , c);

                    sym.play(0);

          }

          else

          {

          //Stop looping and continue with the other action

                    sym.$("Rectangle2").show();

          //Here you can jump to any label or do whatever is required

          }

           

          Attaching a simple sample created to show the behavior.

           

          Thanks and Regards,

          Sudeshna Sarkar

          1 person found this helpful