# attachMovie in array

**URL:** https://forum.kirupa.com/t/attachmovie-in-array/216783
**Category:** flash
**Created:** [February 20, 2007, 3:13pm UTC](https://forum.kirupa.com/t/attachmovie-in-array/216783 "2007-02-20T15:13:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![qpixo](https://avatars.discourse-cdn.com/v4/letter/q/c4cdca/32.png) [@qpixo](https://forum.kirupa.com/u/qpixo)
#### Post date: [February 20, 2007, 3:13pm UTC](https://forum.kirupa.com/t/attachmovie-in-array/216783/1 "2007-02-20T15:13:05Z")

</div>

Is that possible to load some movie clips in an array and attach them in specific movie clip that have been defined. Basically I want them to load as a slide.

Here what I mean:

var tab\_mc = [];  
var slide\_mc = this.createEmptyMovieClip(“slide\_mc”, 1);  
var nb\_elt = 11;  
var compteur = 1;

loader\_ens\_img(tab\_mc, nb\_elt);

for(i=1;i\<=nb\_elt;i++) {  
tab\_mc\* = this.attachMovie(“slide”+i,“slide”+i+"\_mc", 1, {\_x: 0, \_y: 0});  
}

function loader\_ens\_img(tab\_mc, nb\_elt) {  
if(compteur \<= nb\_elt-1) {  
if(compteur == 0){  
accorder\_temps(tab\_mc, nb\_elt);  
}  
slide\_mc.\_alpha = 0;  
slide\_mc.loadMovie(tab\_mc[compteur],1);  
time(tab\_mc, nb\_elt);  
}  
compteur++;  
}

I’m trying that but it seem doesn’t work. Actually the attachMovie is loading the last MC in an array.
