I have a list of variables loaded from a MySQL database. I can access them from my nested MC if I type in the exact variable name like this:
on (press) {
trace ("word3 = " + _parent.word3); // good!!
}
But I can’t access them using dynamic variables. I’ve included my code showing how I’ve tried to access them along with their respective responses.
on (press) {
_global.i = i++;
trace("_global.i = "+i++);
//trace("word3 = "+_parent.word+i); // undefined
//trace("word3 = "+_parent["word"+i]); // no
//_parent.answer = _root["word"+i]; // literal string =[
//_parent.answer = eval("word"+i); // undefined
// _parent.answer = eval(word+i); // NaN
//trace("answer = "+(eval("word"+i))); // LOCK UP!
trace(_parent.answer);
this.gotoAndStop(1);
}
Thanks in advance.