alipica
October 5th, 2009, 10:25 PM
I'm hoping this will be an easy question to answer. Basically, I'm trying to loop through my sub menu buttons to see if they're on a certain frame.
My question deals with an if statement inside a for loop:
if (MovieClip(root).subMenu1.currentFrame == "16") {
MovieClip(root).subMenu1.gotoAndStop("out");
}
Is it possible to replace the instance name (subMenu1) with a variable? I tried just replacing it but that didn't work. I also tried adding plus signs around it and that didn't work either.
Obviously, I'm new to actionscript. Sorry for the stupid question =S
Thanks for any answers in advance!
My question deals with an if statement inside a for loop:
if (MovieClip(root).subMenu1.currentFrame == "16") {
MovieClip(root).subMenu1.gotoAndStop("out");
}
Is it possible to replace the instance name (subMenu1) with a variable? I tried just replacing it but that didn't work. I also tried adding plus signs around it and that didn't work either.
Obviously, I'm new to actionscript. Sorry for the stupid question =S
Thanks for any answers in advance!