*** ATTACHMOVIE sequential stop motion preloader

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”:

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:

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