now I have:
var var1:String = "mc1"
var var2:String = "mc2"
But it still gives me the same error.
TypeError: Error #1010: A term is undefined and has no properties.
at Function/ruse_fla:MainTimeline/onBtnCClick/ruse_fla:completeConfiguration()[ruse_fla.Main Timeline::frame1:114]
I see you want to have "values" changed dynamicaly with only a few lines of code. That's always the goal.
But I was wondering if you thought of using the MovieClip's main caracteristic, which is being a dynamic class. I do not see your whole code, but maybe you could think about storing the actual Textfields or movieclips as the buttons' properties. Inside your MouseEvent function, you could target them, (maybe) more easily.
In general, "this" is a reference to the current timeline.
Aside from a typo in the code, the [undefined] is indicating you have an issue with the object you are trying to target It doesn't exist. You need to be sure you've named "mc1" by that name and that it is present when that code executes.
Yep, you need to have some kind of targeting lead-in for the bracket notation to work, and "this" is usually a workable option.
When you use trace([var1]) you are merely tracing the elements of an array you just created when you used [var1] alone.
The problem you seem to have is that you do not have an object on the stage when that code executes that has the instance name "mc1" assigned to it.
If you replace
you'll probably still be getting the error, though it might turn into a 1009 error. If so, that's indicating for certain that there is no object named mc1 around where that code is.