1 Reply Latest reply on Sep 19, 2009 11:36 PM by kglad

    for loops for tons of function

    shintashi Level 1

      I'm wondering how to properly for loop these blocks (and ones like them)

       

      sense(pl.L2.s1); sense(pl.L2.s2); sense(pl.L2.s3); sense(pl.L2.s4); sense(pl.L2.s5);
      sense(pl.L3.s1); sense(pl.L3.s2); sense(pl.L3.s3); sense(pl.L3.s4); sense(pl.L3.s5);
      sense(pl.L4.s1); sense(pl.L4.s2); sense(pl.L4.s3); sense(pl.L4.s4); sense(pl.L4.s5);
      sense(pl.L5.s1); sense(pl.L5.s2); sense(pl.L5.s3); sense(pl.L5.s4); sense(pl.L5.s5);
      sense(pl.L6.s1); sense(pl.L6.s2); sense(pl.L6.s3); sense(pl.L6.s4); sense(pl.L6.s5);

       

      sense(pl.A2.s1); sense(pl.A2.s2); sense(pl.A2.s3); sense(pl.A2.s4); sense(pl.A2.s5);
      sense(pl.A3.s1); sense(pl.A3.s2); sense(pl.A3.s3); sense(pl.A3.s4); sense(pl.A3.s5);
      sense(pl.A4.s1); sense(pl.A4.s2); sense(pl.A4.s3); sense(pl.A4.s4); sense(pl.A4.s5);
      sense(pl.A5.s1); sense(pl.A5.s2); sense(pl.A5.s3); sense(pl.A5.s4); sense(pl.A5.s5);
      sense(pl.A6.s1); sense(pl.A6.s2); sense(pl.A6.s3); sense(pl.A6.s4); sense(pl.A6.s5);

      ---

      sense(movieclip) is a function that works inside onEnterFrame.

       

      I genuinely assume the for loop might look something like

      for(i, i<0, i++)

       

      {sense(pl.L[i].s[i]);

      sense(pl.A[i].s[i]);

      ...

      }

       

      But i'm terrible at parsing 'for' loops and I'm a bit worried with an estimated 200+ "sense()" functions.