so I'm making this game,
I have around 1000 lines of code,
everything's fine.

then, at some point, I start getting an error in the line that looks something like this:
Code:
eval("_root.myclip.var" add varnum).varX = X;
for almost 10 minutes I can't figure out what's wrong with this line,
then I start suspecting that maybe you can't have variable inside of variable,
so I change the code and everything works.

now it's not that important or anything it's just that I'm wondering if it's possible to have a variable inside of a variable in any way or not? if it is then how would you do it?

I know arrays might be an answer, but is there any other way?