2 Replies Latest reply on May 20, 2015 2:22 PM by ea2th

    Conditions using frame label

    ea2th Level 1

      Should be pretty simple one here to get an answer on.

      Attempting to play a symbol on the stage that when pressed will play this symbol and stop on a frame label.

      when pressed again then plays this symbol from the frame label, reversed.

       

       

       

      // Set a toggle to play or pause the symbol timeline

      if (sym.getSymbol("close_btn").isPlaying()) {

        sym.getSymbol("close_btn").stop();

      } else {

        sym.getSymbol("close_btn").play();

      }

        • 1. Re: Conditions using frame label
          seano2o7 Level 3

          Make a variable in compositionReady like this

           

          reverse = 0;

           

          On the stop click say

           

          reverse = 1;

           

          Put this if statement above the stop click

           

          if(reverse == 1) {

          play reverse animation

          reverse = 0;

          }

           

          I hope this helps

          • 2. Re: Conditions using frame label
            ea2th Level 1

            ahh thx! i need to try this.

             

            I ended up just creating a display on/off with an invisible btn that overlayed my nested animated button.

            when the display state was on, after the timeline reached the stop point, when the display button was pressed it played both the stage and nested button's animation in reverse from the stop position.