Hi,
I want to make my function with less code, how can I loop through the images and add them without using 4 loaders?
Cheers.
public function addContents (image1, image2, image3, image4) {
var loader:Loader = new Loader();
loader.load(new URLRequest(image1));
addChild(loader);
var loader2:Loader = new Loader();
loader.load(new URLRequest(image2));
addChild(loader2);
var loader3:Loader = new Loader();
loader.load(new URLRequest(image3));
addChild(loader3);
var loader4:Loader = new Loader();
loader.load(new URLRequest(image4));
addChild(loader4);
}