for(var i:int=0;i<10;i++)
{
var loader:Loader=new Loader();
loader.load(new URLRequest("images/Light.png"));
loader.x=200;
loader.y=200;
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,changeImage(loader));
this.addChild(loader);
}
//最主要是这步
function changeImage(loader):Function
{
var returnURL=function(e):void
{
loader.width=30;
loader.height=30;
}
return returnURL;
}