+++ CASE +++
I’m doing a duplicateMovieClip and that works fine. But I can’t seem to trigger any actions like gotoAndPlay(nextFrame) in a duplicated mc from another duplicated mc… unless I hardcode a target.
+++ trial and error +++
if I prepare a string and use it as a target, it won’t work. If I hardcode it the tellTarget works fine. What am I doing wrong?
> WORKS:
str = “_root.system.menu.template2”;
tellTarget(str) { doSomething(); }
> DOES NOT WORK:
// textfield with one of the duplicated movieclip names
pmc = _root.system.menu.txt;
str = “_root.system.menu.” add pmc;
tellTarget(str) { doSomething(); }
> When I do a trace(str) on that string it seems to be correct. I’ve also tried using a valueOf() but that does not help me.
situation:
> A movieclip is duplicated (the original was named “template” and the duplicates get a number attached to that) there’s a button with a small script.
> In the movieclip that holds the duplicate mcs, I store a variable (txt) with the name of the movie clip where a button has last been clicked on. It has a value like “template1”.
Thanks a lot for the help!