# My MovieClipLoader load random in array?

**URL:** https://forum.kirupa.com/t/my-moviecliploader-load-random-in-array/206352
**Category:** Uncategorized
**Created:** [November 7, 2006, 2:05pm UTC](https://forum.kirupa.com/t/my-moviecliploader-load-random-in-array/206352 "2006-11-07T14:05:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![johnnyboy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/johnnyboy/32/1973_2.png) [@johnnyboy](https://forum.kirupa.com/u/johnnyboy)
#### Post date: [November 7, 2006, 2:05pm UTC](https://forum.kirupa.com/t/my-moviecliploader-load-random-in-array/206352/1 "2006-11-07T14:05:03Z")

</div>

Okay guys… my brain is having a serious breakdown…

Can anyone tell me why my moviecliploader is loading everything in random order when I load from an array in a for-loop!??

[AS]  
getItems();

// LOADER  
function onLoadStart(target:MovieClip)  
{  
target.\_visible = false;  
}  
function onLoadInit(target:MovieClip)  
{  
if(target != statements\_mc)  
{  
target.\_y = nextPlace;  
target.\_focusrect = false;  
target.onRollOver = this.\_parent.\_parent.newsItemOver;  
target.onRollOut = this.\_parent.\_parent.newsItemOut;  
target.onPress = this.\_parent.\_parent.newsItemPress;  
[//target.ID](https://target.ID) = mc\_counter;  
//mc\_counter++;

```
    nextPlace = target._y + target._height + 25;

    if(mc_counter &lt;= counter)
    {
        bottom = newsHolder._y+mask_mc._height-newsHolder._height-space;
    }
}
target._visible = true;

```

}  
Mcl.addListener(this);  
Mcl.loadClip(“statements.swf”, statements\_mc);

function getItems()  
{  
//for(var i:Number = 0; i\<\_level0.container\_mc.newsItemArr.length; i++)  
for(i in \_level0.container\_mc.newsItemArr)  
{  
//trace(\_level0.container\_mc.newsItemArr\*[2]);  
loadItem(i);  
}  
}  
function loadItem(i:Number)  
{  
var mc2 = newsHolder.createEmptyMovieClip(“newsItem” + i, newsHolder.getNextHighestDepth());  
mc2.\_alpha = 80;  
Mcl.loadClip(\_level0.container\_mc.newsItemArr\*[2], mc2);  
\_level0.container\_mc.idArkivArr\* = mc2;  
}  
[/AS]

Please help me out here…
