//要加载的素材数组
var imagesArray:Array = new Array('image1.jpg', 'image2.jpg','image3.jpg','image4.jpg');
//已加载的素材数组
var loadedArray:Array = new Array();
var counter:int = 0;
//加载文件函数
function loadImage():void{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
loader.load(new URLRequest(imagesArray[counter]));}
//加载成功后调取
function loaded(e:Event):void{
//将已加载的置入数组
loadedArray.push(e.target.content);
//判断是否是最好一个
if(counter == imagesArray.length-1){
for(var i:uint = 0; i < loadedArray.length; i++){
loadedArray[i].x = 0 + i * 100;
addChild(loadedArray[i]); }
} else{
counter++;
loadImage();
}}
//从第一个开始加载
loadImage();