# \*\*\* ATTACHMOVIE sequential stop motion preloader

**URL:** <https://forum.kirupa.com/t/attachmovie-sequential-stop-motion-preloader/218949>\
**Category:** flash\
**Created:** [March 12, 2007, 7:06pm UTC](https://forum.kirupa.com/t/attachmovie-sequential-stop-motion-preloader/218949 "2007-03-12T19:06:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![onoitzalvin](https://avatars.discourse-cdn.com/v4/letter/o/b38774/32.png) [@onoitzalvin](https://forum.kirupa.com/u/onoitzalvin)\
**Post date:** [March 12, 2007, 7:06pm UTC](https://forum.kirupa.com/t/attachmovie-sequential-stop-motion-preloader/218949/1 "2007-03-12T19:06:39Z")

</div>

sup champs.

hey, can anyone figure out this attachMovie problem?

i’m guessing it’s because i’m not using removeMovieClip, but then i’m not sure how i’d go about using removeMovieClip in an incremental way.

in the following example, i have it setup with an mc on stage with an instance name of “holder”:

```auto
stop();

var Loaded:Number = getBytesLoaded();
var Total:Number = getBytesTotal();

for (var i=1; i<= 13; i++) {
var amount:Number = Math.round((this.Loaded / this.Total) * 100);

if (amount = (i*(Math.round(100/13)))) {
trace ("i = " + i)

var myHolder:MovieClip = holder.attachMovie("oni_"+i, "oni"+i+"_mc", this.getNextHighestDepth()+100);
//holder.swapDepths();
//holder.removeMovieClip;

//trace (holder._width);
trace ("oni"+i+"_mc");
trace(holder.getDepth());
trace ("amount = " + amount)
trace ("holder = " + this.holder)
}

}

```

then i tried using createEmptyMovieClip:

```auto
stop();

var Loaded:Number = getBytesLoaded();
var Total:Number = getBytesTotal();

for (var i=1; i<= 13; i++) {
var amount:Number = Math.round((this.Loaded / this.Total) * 100);

if (amount = (i*(Math.round(100/13)))) {
trace ("i = " + i)
this.createEmptyMovieClip("holder"+i, "holder"+i, this.getNextHighestDepth());
var myHolder:MovieClip = this["holder"+i].attachMovie("oni_"+i, "oni"+i+"_mc", this.getNextHighestDepth());
//holder.swapDepths();
//holder.removeMovieClip;
this["holder"+i]._x = i+10;
//trace (holder._width);
trace ("oni"+i+"_mc");
trace(holder.getDepth());
trace ("amount = " + amount)
trace ("holder = " + this.holder)
}

}

```

man i screwed up before in a similar situation but i’m not sure how i came to a solution.

can someone throw me some apples and oranges?

and bananas?  
thanks!  
arvin
