I have six textfields inside a clip, named digit_1 to digit_6.
The path to the first textfield would be:
_root.mcContainer.digit_1;
How can I dynamically address these fields if I only know the number (ie. 1 to 6)? I’ve tried this:
eval("_root.mcContainer.digit_" + number) = "value";
But to no avail. Please help…
system
2
I think it is the other brackets:
eval[“root.mcContainer.digit” + number] = “value”;
system
3
Nope. But I found another way to get it right… Instead of using the textfield as a variable, I gave it an instancename and addressed that, like this:
eval("_root.mcContainer.digit_" + number).text = "value";