I am trying to convert an array of string to MovieClip names which already exist on stage.
THis is how I am doing it but doe snot seem to work. I have 11 movieclips on stage. THeir instance names are "bmc1", "bmc2" and so on. All these BMC movie clips are inside a clip called "bars_mc". So this is how I am coding it right now.
var myBtnArray = ['bmc1', 'bmc2', 'bmc3', 'bmc4', 'bmc5', 'bmc6', 'bmc7', 'bmc8', 'bmc9', 'bmc10', 'bmc11'];
for each (var btn in myBtnArray){
bars_mc.MovieClip(getChildByName(btn)).gotoAndPlay('open');
}
This does not work. I have tried doing:
this[btn]
That also didnt work. This is being coded in AS 3.0.
Need someone t0 help me figure out the right way to convert strings to MOvieclips.
Apprecuiate your help.