I have a clip containing 8 MCs, named id1, id2 etc, each of which contain a dynamic text field with the variable thisNo. I want to run a loop that inserts each digit from a randomly generated number into each of these MCs
PatID is the random number, IDLength is it’s character length.
you’re mixing numbers and strings here,
if PatID is a rand N°, you shouldn’t be using string methods on it,
and IDLength is used in your loop, but where is it assigned the value?? (IDLength=PatID._length)? you don’t even need that, if you want to use the string methods, try i<PatID.toString._length… something like that…
*Originally posted by eyezberg *
**Here’s a quick’n’dirty fla… **
One question though - you used
_root[“id”+i].iconNo = thisNo;
Although my clips were on the same level, they weren’t on the root as per your example. I had to move the target MCs up a level as this wouldn’t work, but _parent would.