# Problem with defining MC names

**URL:** <https://forum.kirupa.com/t/problem-with-defining-mc-names/197151>\
**Category:** flash\
**Created:** [August 14, 2006, 9:57am UTC](https://forum.kirupa.com/t/problem-with-defining-mc-names/197151 "2006-08-14T09:57:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tobijas20](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@tobijas20](https://forum.kirupa.com/u/tobijas20)\
**Post date:** [August 14, 2006, 9:57am UTC](https://forum.kirupa.com/t/problem-with-defining-mc-names/197151/1 "2006-08-14T09:57:51Z")

</div>

Here is my problem:

```auto

[FONT=Courier New][LEFT][FONT=Verdana]/* Just a part of code for duplicate bttn MC*/ 
total = 3;
for (var i = 0; i<total; i++) {
 container.bttn.duplicateMovieClip("bttn"+i, i);
}
// now I have: bttn0, bttn1, bttn2 in container MC[/FONT]
[FONT=Verdana]
/* Now I define myClips for use in MyFunction*/
myClips = [
 container.bttn0,
 container.btn1,
 container.btn2
];
function MyFunction(parameter) {
 for (var i = 0; i<myClips.length; i++) {
  trace("some actions with myClips");
 }
}[/FONT]
[/LEFT]

```

[/FONT]

My question is: How to define myClips without writting each one, something like: container[“bttn”+i] ? When I write this it doesn’t work!
