Feb 21, 2011
So, I'm trying to load resources, add them to a dictionary, and have a drawing method search through that dictionary and draw based on certain predicates. I have a function that iterates through an Vector of Strings, calling on an instance of Loader to load them instantiated as a URLRequest.
View 1 Replies
private function loadImages(urls:Vector.<String>):void
var loader:Loader = new Loader();
So the issue is: Only the first images in my Vector are drawing. Upon further inspection, I found that the completeHandler was only being called once (I put a trace in the complete handler to check). However, the Loader is invoking load everytime the loop iterates. I tried instantiating separate loaders for each resource, just to see if it would work, but I had no luck with that. Do I need to make separate loaders and event handlers? Or am I just not using Loader correctly?