1 Reply Latest reply on Mar 9, 2015 9:48 AM by Preran

    How to reset a counter




      I really want to reset my counter, but I don't know how.

      I have 12 symbols that stands for 12 pages.

      At page 12, I have a replay button. Once you click on it, it starts back at page 1.

      In my replay button code, I have stopped several symbols so it would restart my animation.

      At two of my pages I have a counter. It counts from zero to 98. But I don't really know how to reset these.


      I have tryed some things like:


      This doesn't work because, my animation won't replay back from page 1.


      The best thing that works is

      sym.getComposition().getStage().getSymbol("page_08").getSymbol("counter_study").setVariabl e('counter',0);

      But this is also not the solution because if I replay my animation till one of my counters.

      The number 98 stands there already for like 1 second and then it replays. It need to be at 0 first then replay.


      Some information

      My counter is named = counter_study

      Inside my counter_study, there is a text named "display"

      My counter is also a symbol inside my symbol page_08



      Hope someone has the solution!