I see there are many many tutorials on creating horizontally oriented scrolling image galleries.
I'm trying to load and display images (read in dynamicaly with xml) into a rectangular grid format, say, 2 rows of 3 images.
I believe I understand the nuts and bolts about xml loaders, but my code is only showing what I think is the last image:
Actionscript Code:
function loadComplete(evt:Event):void
{
//flashprojXMLLoader.removeEventListener(Event.COMPLETE, loadComplete);
var flashXMLInfo:XML = XML(evt.target.data);
flashProjDate = flashXMLInfo.project.@date;
flashProjName = flashXMLInfo.project.@pname;
flashProjTitle = flashXMLInfo.project.@ptitle;
flashProjDesc = flashXMLInfo.project.@description;
flashImage = flashXMLInfo.project.@image;
var n=0;
while (n<flashImage.length())
{
for(var i:int = 0; i < 2; i++)
{
for(var j:int = 0; j<3; j++)
{
imageLoader.load(new URLRequest(flashImage[n]));
imageLoader.x = j*200;
imageLoader.y = i*200;
addChild(imageLoader);
trace("positioned image " + flashImage[n] + " at " + imageLoader.x + " , " + imageLoader.y);
n++;
}
}
}
}
the trace command reveals that the coordinates are indeed right on where I expect them to be... only thing is on the stage, only one image shows up. The very last one.
What am I doing incorrectly? I'm not very experienced with the Loader class, I admit.
thank you
Don