3 Replies Latest reply on Jan 16, 2014 11:37 AM by jbowden

    Play section of timeline

    SomethingOrOther

      I want to know if it is possible to use the Edge API to instruct to a symbol to play only a section of it's timeline. (e.g play 0 to 500 and then stop) It wouldn't be using a trigger within that symbol's timeline as I will require the full timeline without a stop trigger.

        • 1. Re: Play section of timeline
          resdesign Adobe Community Professional & MVP

          Yes. If you have a label named for example start and a stop() at 500 s later then you can use:

           

          sym.getsymbol('symbolName').play('start');

           

          it will play from start to the stop() action on the timeline.

           

          Note: you will have to refer to this symbol using the appropriate scope.

          See my blog here for scope:

          http://www.edgehero.com/tutorials/scope

          1 person found this helpful
          • 2. Re: Play section of timeline
            SomethingOrOther Level 1

            I have a timeline that runs from 0 to 500. But I want the the button to play only a selection of that timeline from 0 to 250. Where as the timeline can be played in full using another button.

            • 3. Re: Play section of timeline
              jbowden Adobe Employee

              Hi SomethingOrOther,

               

              To do something like this, you could set a global Boolean value on playback of the shorter duration part, and then test for it in the trigger that stops the playback at 250.

               

              So put something like this in your 0 to 250 button:

               

              sym.playto250 = true;

              sym.play();

               

              And on your trigger at 250:

               

              if (sym.playto250) {

                   sym.stop();

              }

               

              And then your other button that plays the entire timeline would have this code:

               

              sym.playto250 = false;

              sym.play();

               

              Oh, and it's also probably considered best practices (but not critical) to also initialize the sym.playto250 variable in your Stage compositionReady handler, since it's global the Stage:

               

              sym.playto250 = false;

               

              hth,

              Joe

              1 person found this helpful