3 Replies Latest reply on Apr 15, 2012 1:58 PM by Ned Murphy

    can i do this (use a counter "i" in instance name)



      i have  5 Dynamic Text object in my scene and i need to do a treatement for them (compare each one to the other)

      my Text instance names are :


      and their variable names are :


      what i need to do is :

      if (t0>t1) then to0 will move to the place of to1 and to1 will move to the place of to0


      till now i have no problem to compare 2 elements and change their place but what if i have a large number or an unknow number of elements , i know that i can (should) a for loop but the problem is that i can't do this

      for examle let's say that i have 10 elements :







      //this code work perfectly when i work with an array

      i hope that you understand my problem, i don't need someone to tell me how to apply a sort in a table all i want is the ability to use a counter on an instance/variable name of a MovieClip,DynamicText,etc...


      thank you