# Giving actions to multiple mc-s

**URL:** <https://forum.kirupa.com/t/giving-actions-to-multiple-mc-s/268017>\
**Category:** Uncategorized\
**Created:** [August 8, 2008, 8:35am UTC](https://forum.kirupa.com/t/giving-actions-to-multiple-mc-s/268017 "2008-08-08T08:35:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ancerick](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@ancerick](https://forum.kirupa.com/u/ancerick)\
**Post date:** [August 8, 2008, 8:35am UTC](https://forum.kirupa.com/t/giving-actions-to-multiple-mc-s/268017/1 "2008-08-08T08:35:53Z")

</div>

Hy,

i have a problem. Im trying to make a gallery.  
i have one mc copyed around the single scene and it needs to be in different frames.  
basicly i want to use do while to say where its suposed to be. but eaven though trace returns correct mc names and mc frame numbers. nothing happens … why?

Code:

var maniac\_x2:Number = 0;

do {  
maniac\_x2++;  
maniac\_x4 = “l” + maniac\_x2  
maniac\_x3 = [maniac\_x4].toString();  
maniac\_x3.gotoAndStop(maniac\_x2);

};

trace ("mc name is : " + maniac\_x3 + " mc frame is : " + maniac\_x2);

}  
while (maniac\_x2 \< 57);  
stop();
