3 Replies Latest reply on Dec 23, 2010 12:22 PM by kglad

    Stop all nested movieclips

    19Bert67

      Hello,

       

      I made a series of nested movieclips, and to stop all motion i wrote this code:

       

      on (press) {
      MCinMCinMC.stop();
      MCinMCinMC.MCinMC.stop();
      MCinMCinMC.MCinMC.MC.stop();

      MCinMCinMC.MCinMC1.stop();
      MCinMCinMC.MCinMC1.MC.stop();

      MCinMCinMC.MCinMC2.stop();
      MCinMCinMC.MCinMC2.MC.stop();


      MCinMCinMC1.stop();
      MCinMCinMC1.MCinMC.stop();
      MCinMCinMC1.MCinMC.MC.stop();

      MCinMCinMC1.MCinMC1.stop();
      MCinMCinMC1.MCinMC1.MC.stop();

      MCinMCinMC1.MCinMC2.stop();
      MCinMCinMC1.MCinMC2.MC.stop();


      MCinMCinMC2.stop();
      MCinMCinMC2.MCinMC.stop();
      MCinMCinMC2.MCinMC.MC.stop();

      MCinMCinMC2.MCinMC1.stop();
      MCinMCinMC2.MCinMC1.MC.stop();

      MCinMCinMC2.MCinMC2.stop();
      MCinMCinMC2.MCinMC2.MC.stop();

       

      This code works fine, but can somebody explain how to write this in a more compact way?