I’m trying to update a variable in the root stage.
The vars are called a1, a2, a3… and so on.
In the child movieClips which instances are called “a1”, “a2”, “a3”… and so on, I tried this:
MovieClip(parent).a1 += 1;
tracing and updating the parents var works.
When i try:
trace(MovieClip(parent)+MovieClip(this).name);
tracing works,but updating the var doesn’t:
MovieClip(parent)+MovieClip(this).name += 1;
I tried
(MovieClip(parent)+MovieClip(this).name) += 1;
(MovieClip(parent) + “.” + MovieClip(this).name) += 1;
(MovieClip(parent) + “.” + this) += 1;
trace( MovieClip(root).name += 1;
and some weird things with [] but nothing seems to work. Im on the wrong way or missing something.
I want to construct a var that is built by another vars name and then behaves like a var.
e.g. var myVar = MovieClip(parent).name + “.” + MovieClip(this).name;
But i fail and can’t use that var to manipulate it’s properties or value.
AS3 throws a var called “whatever.a11” instead of using whatever.a1 adding 1.
Any ideas or help?