ashar
03-30-2005, 06:46 PM
Without going into all the details, I just want to refer to a
static component name by using a variable....
I have several components in a MC,
mc1.txt_BODY
mc1.cb_BODY
mc1.txt_WEIGHT
mc1.cb_WEIGHT
etc....
I want to be able to reference those components by using
the value I have in a variable called TITLE which will have
a value i.e. "BODY"
mc1.txt_[TITLE].text = "..." //DOESN'T WORK
I tried putting the entire component name in a string and referencing it...
component = ".txt_" + TITLE;
mc1.[component].text = "....." //doesnt work
mc1[component].text = "...." //doesn'twork
Any help ?
static component name by using a variable....
I have several components in a MC,
mc1.txt_BODY
mc1.cb_BODY
mc1.txt_WEIGHT
mc1.cb_WEIGHT
etc....
I want to be able to reference those components by using
the value I have in a variable called TITLE which will have
a value i.e. "BODY"
mc1.txt_[TITLE].text = "..." //DOESN'T WORK
I tried putting the entire component name in a string and referencing it...
component = ".txt_" + TITLE;
mc1.[component].text = "....." //doesnt work
mc1[component].text = "...." //doesn'twork
Any help ?