i have several MovieClips called a1, a2, a3, b1, b2, b3 and so on.
I put the names in an array, trying to adress some MovieClips called red_a1, red_a2 … and so on dynamically.
Here is what i tried:
//var deckArray:Array = new Array(a1,b1,c1,a2,b2,c2,a3,b3,c3);
var deckArray:Array = ["a1","b1","c1","a2","b2","c2","a3","b3","c3"];
for (var deck in deckArray)
{
trace("red_" + deckArray (deck)); // this traces what i want to target!
"red_" + deckArray (deck).visible; // this throws error
// ["red_"] + deckArray (deck).visible; // this throws error
// blue_" + deckArray (deck).visible;
}
I can trace it, but the compiler throws an error:
1119: Access of possibly undefined property invisible through a reference with static type String.
What am I doing wrong?