Hello,
I'm having trouble setting a variable based on a combination of strings and
another variable. I have several dynamically duplicated movie clips with
instance names of "qTotalCount_"+i. Inside these movie clips is a variable
named "qCount". I need to draw the value from "qTotalCount[i].qCount"
based on the value of a variable named "_root.ID" to set the value of
another variable called "QuestionTotal". Lets say the instance names are as
follows:
***Movie Clip Variable Values ***
qTotal1.qCount - value of 1
qTotal2.qCount - value of 5
qTotal3.qCount - value of 7
***ID value***
_root.ID - value of 3
Based on this, I need to set the variable QuestionTotal = qTotal3.qCount.
I've ran traces on all the movie clips and variables and they are all
correct. Below is the code that I've been working with but it's not
working.
QuestionTotal = _root["qTotalCount_"+_root.ID+".qCount"];
trace(QuestionTotal);
Thanks in advance for any help on this matter.
Scott
Bookmarks