2 Replies Latest reply on Apr 23, 2015 1:07 AM by owen_bayley

    How do I control symbols within other symbols

    owen_bayley Level 1

      I'm trying to get all of my symbols in my project and stop the animation. I can get the symbols that are on the main stage but I'm unable to get symbols within symbols. This is what I have so far:

       

      var all = sym.getChildSymbols();

      for (var i=0; i < all.length; i++) {

      all[i].stop(0);

      }

        • 1. Re: How do I control symbols within other symbols
          seano2o7 Level 3

          Hey Owen

           

          Is there anything in that function getChildSymbols(); ?

           

          I'm not sure if it will work but make a class for the Symbols you want to stop like this

           

          Screen Shot 2015-04-22 at 22.08.25.png

           

          Make a new function called stopChildSymbols like this

          sym.stopChildSymbols = function() {

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

          }

           

          then just call the class whenever you want to stop the symbols like this

           

          sym.stopChildSymbols();

           

          I tested it on one symbol and it worked so it should work with all the symbols in the class.

           

          Hope this helps

          • 2. Re: How do I control symbols within other symbols
            owen_bayley Level 1

            Hey Sean ,

             

            This could work but it will take to much time, as there are symbols within symbols within symbols for several projects.

             

            I need something that can find all the symbols in the project and reset them to 0 seconds on the time line, preferably without altering anything individually.

             

            Thank you anyway