I am trying to do this in as3
for (var i = 0; i < 8; i++) {
var clip = "markerMC" + i;
this.scoreGridMC[clip]._visible = false;
}
but I get compile errors all the time.
Any help,
Thanks….
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is as3, taskinoor’s answer is as3 only if you set those names as movieclip instance names in the flash IDE…
Option #1: getChildByName(“childName”);
for the above to work you would need to set the mc.name when you create the movieclips to something like mc.name = “markerMC”+0; and +1 and … all the way to +8; for the respective movieclips.
For reference, to go through the all the children of a movieclip try something like (this is option #2):
Once again, taskinoor’s answer is valid as well but you have to create the mc’s manualy trough the flash IDE and assign them instance names in their properties panel…
Also, when you get a compile error, google it until you find the solution on the net. The net is there, you just have to use it. Also, you might want to post those compile errors in the question for obvious reasons as well as your as3 code in case this is not it.
Good luck.