If you already have an Array , you can define a random sort, then you can add them to the scene as needed.
//get your array as needed... var myArray:Array = getYourMovieClipsArray(); //randomize it by "sorting" it... myArray.sort(randomSort); //do something with them... for(var i:int=0;i<myArray.length;i++){ addChild(myArray[i]); } //sorting function public function randomSort(objA:Object, objB:Object):int{ return Math.round(Math.random() * 2) - 1; }
scunliffe
source share