For example:
for(var i:int=0; i<someArray.length; i++)
{
var loader:Loader=new Loader();
loader.load(new URLRequest("http://testurl.com/test.jpg"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void{imageLoaded(e,i)});
}
The second paramter (i) for imageLoaded is always 1, I guess because i no longer exists and is defaulting to 1. Is it possible to get that second paramter to be evaluated when the load is started rather than on complete?
This should be doable using Flex’s dynamic function construction. Check out the article I posted on how to pass additional to parameters to an event listener.