MX: can variables be used in movieclip paths?

hi all,
maybe it’s easy after all, but i can’t find any solution to this problem: i want to use VARIABLES in MC paths / for calling methods for a group of MCs.

example:

let’s say the movievlip “Level2_mc” contained quite a large series of similar movieclips with “serial” instance names (like clip1, clip2, … clip 30) which i wanted to start/stop simultaneously without handwriting all the code… could i somehow use a counter AS PART OF the instance name IN THE MOVIECLIP PATH?

somewhat like this…

for (counter=1; counter<31; counter++) {
_root.Level1_mc.Level2_mc.[COLOR=orangered]clip**<+counter>** [/COLOR].GotoAndPlay(“go”);
}

any help is greatly appreciated! :slight_smile:
greenlander


for (counter=1; counter<31; counter++) {
_root.Level1_mc.Level2_mc["clip" + counter].gotoAndPlay("go");
}

That’ll do it. I assume the clips are called clip1, clip2, clip3, etc.

-Al

Thanks a lot Al,
that was a lightening-fast reply. And it was easy enough-- argh. But sometimes I seem to be unable to come up with the most plausible solutions :wink: … Everythink works fine now, thanks again.

Cheers,
Greenlander

Hey no prob.

It took me a while to figure that out myself. Then I discovered these forums and the ones over at www.werehere.com. Great resources when you’re in a jam.

-Al