# Preloader problem - attachMovie?

**URL:** <https://forum.kirupa.com/t/preloader-problem-attachmovie/53975>\
**Category:** Uncategorized\
**Created:** [June 9, 2004, 9:26pm UTC](https://forum.kirupa.com/t/preloader-problem-attachmovie/53975 "2004-06-09T21:26:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oskar](https://avatars.discourse-cdn.com/v4/letter/o/f07891/32.png) [@oskar](https://forum.kirupa.com/u/oskar)\
**Post date:** [June 9, 2004, 9:26pm UTC](https://forum.kirupa.com/t/preloader-problem-attachmovie/53975/1 "2004-06-09T21:26:15Z")

</div>

Hi,

I have a problem with a preloader that isn’t working, it works fine on other files that are loaded in the same way on the same site, the only difference with this file is a script that is at the end of the timeline which uses attachMovie to place some images… the result is that the preloader doesn’t show, there is just a wait and then the movie appears suddenly.

any ideas?? thanks 🙂

this is the code that appears at the end of that movie:

// \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ VARIABLES  
// \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_IMAGES  
images = 3;  
slack = 20;  
imageSize = 310;

this.createEmptyMovieClip(“holder”, 2);  
for (i=1; i\<=images; i++) {  
holder.attachMovie(“image”+i, “image”+i, i);  
holder[“image”+i].\_y = holder[“image”+(i-1)].\_y+holder[“image”+(i-1)].\_height+slack;  
}

i = 1;  
// \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_SETMASK  
holder.setMask(mask);  
holder.\_x = mask.\_x;  
holder.\_y = mask.\_y;

// \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ F U N C T I O N S  
// . . . . . . . . . . . . . . . . .  
// \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_Slide  
changey = function (targety) { y = (y == undefined) ? holder.\_y : y;holder.\_y += y=(y+(targety-holder.\_y)/4)\*0.7;};  
slide = function (targety) { clearInterval(slideLoop);slideLoop = setInterval(this, “changey”, 30, targety);};  
getImage = function (i) { oldY = (oldY == undefined) ? holder.\_y : oldY;slide(-holder[“image”+i].\_y);up.\_visible = (i\>1) ? true : false;down.\_visible = (i\<images) ? true : false;};  
// \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_Button Events  
up.onPress = function() {  
–i;  
getImage(i);  
};  
down.onPress = function() {  
++i;  
getImage(i);  
};  
//  
//  
// \_\_\_\_\_\_\_\_\_\_\_\_START  
getImage(1);  
stop();
