The images are to go from 1 - 20 … Left to Right on stage. The images are named image_1 - 20 and everything is right as far as that’s concerned.
Will images load according to their size before XML order? I’m loading multiple images from XML like so:
XML...
function formatXMLContent():void {
for (var i:int = 0; i < tourID.length(); i++) {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
loader.load(new URLRequest(tourImage*));
box = new Sprite();
box.graphics.beginFill(0x000000, 0);
box.graphics.drawRect(0, 0, 310, 340);
box.graphics.endFill();
box.x = i * (box.width - 45);
boxes.push(box);
content_mc.addChild(box);
mapHotSpot = new MapHotSpot();
mapHotSpot.buttonMode = true;
mapHotSpot.useHandCursor = true;
mapHotSpot.x = 225;
mapHotSpot.y = 288;
MakeLink.Link(mapHotSpot, tourLink*, "_blank");
box.addChild(mapHotSpot);
}
}
function imageLoaded(e:Event):void {
var image:Bitmap = (Bitmap)(e.target.content);
var holder = boxes[loadedImages];
**holder**.addChild(image);
loadedImages++;
}
If I trace loadedImages or holder, etc… they trace in the RIGHT order.
Why not on screen?
Thank you for my sanity.