# FOR dilema

**URL:** <https://forum.kirupa.com/t/for-dilema/189321>\
**Category:** flash\
**Created:** [June 1, 2006, 5:00pm UTC](https://forum.kirupa.com/t/for-dilema/189321 "2006-06-01T17:00:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![x\_polar](https://avatars.discourse-cdn.com/v4/letter/x/9dc877/32.png) [@x\_polar](https://forum.kirupa.com/u/x_polar)\
**Post date:** [June 1, 2006, 5:00pm UTC](https://forum.kirupa.com/t/for-dilema/189321/1 "2006-06-01T17:00:34Z")

</div>

Hiya all,

Is it possible to use the for method to tell flash to apply the same script for a whole group of mc’s ?

Let’s say I have m1\_mc, m2\_mc… m15\_mc and I want all these mc’s to initiate a certain script once a certain frame is loaded… :luigi:

I tried coming up with my own script to realize my theory :

\_root.onEnterFrame = function () {  
for(var i = 0;i\<15; i++) {  
\_root.m\*\_mc.gotoAndPlay(12);  
}  
}

It [COLOR=Red]doesn’t work[/COLOR], simply because I’m not too experienced with AS…help
