# attachMovie problem in AS2

**URL:** <https://forum.kirupa.com/t/attachmovie-problem-in-as2/297782>\
**Category:** flash\
**Created:** [October 8, 2009, 12:30pm UTC](https://forum.kirupa.com/t/attachmovie-problem-in-as2/297782 "2009-10-08T12:30:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![whistle](https://avatars.discourse-cdn.com/v4/letter/w/c67d28/32.png) [@whistle](https://forum.kirupa.com/u/whistle)\
**Post date:** [October 8, 2009, 12:30pm UTC](https://forum.kirupa.com/t/attachmovie-problem-in-as2/297782/1 "2009-10-08T12:30:49Z")

</div>

Hello.

I have Flash CS3 - and the project is in AS2.

stop();  
myMCL = new MovieClipLoader ();  
myListener = new Object ();  
function initClips()  
{  
for (i=1;i\<=1;i++)  
{  
holder.attachMovie (“img”, “img”+i,i);  
myMCL.loadClip(“images/” + i + “.jpg”, holder[“img” + i]);  
holder[“img”+i].\_height = holder.\_height; // !!! THIS IS WHERE THE PROBLEM IS  
}  
}  
myMCL.addListener(myListener);  
initClips();

This is the code so far. The for is used so I will be able to add more images and elaborate into a slideshow. The main issue is that I can’t resize it. The linkage mc has a width and height of 1 px and if I resize it multiplies the size of the picture rather than assigning it.

To understand better: if I do holder[“img”+i].\_height = 0.5; it halves the image size -\> 1 = 2 \* 0.5 (just to be clear). So it acceses the container of the image and not the image it self.

I need this because I can’t find a way to load N number of images without XML, arrays, text files or anything else. Hopefully it will end the for with something triggered by the onLoadError handler.

Thanks very much.
