dellengwyn
Technical User
In my movie, I am duplicating movie clips, and naming them dynamically by incrementing a variable (e.g., call them clip1, clip2, clip3, etc.)
I want to compare the value of a variable in each of these clips to a value in an "if" statement. The variable is named IDnumber. The if statement is inside a "for" loop. I want to use the incrementing variable of the "for" loop to dynamically step through the clips and check the IDnumber value. So, here is the question:
How do I refer to the movie clip using a variable in its name?
I have tried, for example:
if (["clip" + i].IDnumber == 3)
Let's say that i=5. It seems as if Flash is unable to interpret this as referring to the variable clip5.IDnumber
I've tried trace() to output the value, just to see if my syntax is working, but every permutation I've tried fails to output the value of IDnumber.
Needless to say, I am using Flash 5. I am not well versed in slash syntax, so I haven't tried that yet.
Anyone have any ideas?
I want to compare the value of a variable in each of these clips to a value in an "if" statement. The variable is named IDnumber. The if statement is inside a "for" loop. I want to use the incrementing variable of the "for" loop to dynamically step through the clips and check the IDnumber value. So, here is the question:
How do I refer to the movie clip using a variable in its name?
I have tried, for example:
if (["clip" + i].IDnumber == 3)
Let's say that i=5. It seems as if Flash is unable to interpret this as referring to the variable clip5.IDnumber
I've tried trace() to output the value, just to see if my syntax is working, but every permutation I've tried fails to output the value of IDnumber.
Needless to say, I am using Flash 5. I am not well versed in slash syntax, so I haven't tried that yet.
Anyone have any ideas?