I have a path (String variable called “nowpath”) where a value is pushed into temporarily, for instance ui.par1.blocktint
The specic movieclip on the end of the path (blocktint) has a function implementback() and if I directly test out
test3 = _root.ui.par1.blocktint;
test3.implementback();
It executes this function. That works properly. But not when trying
test3 = "_root."+nowpath;
test3.implementback();
So I started testing with square brackets, for instance directly testing
test3 = _root["ui"]["par1"]["blocktint"];
test3.implementback();
Works as well. So I split the path with an extra function to imediately rejoin into variable “ob”
var results:Array = nowpath.split(".");
for(j=0;j<results.length-1;j++){
ob += '["'+ results[j] + '"]'
}
So that “ob” outputs like [“ui”][“par1”][“blocktint”] and then I try
test3 = "_root"+ob;
test3.implementback();
Still no luck. I’m having a lot of dificulties concatenating the test3 from “_root” and the nowpath variable
Anybody any clue what goes wrong?
t.i.a
P