Hi all,
I’m trying to pull a set of thumbnails from an XML file, and then get it to display on the page.
I’ve got a simple for loop set up to handle the function, but whenever I test the file only the last image shows up. But it shows up in the correct location (where it would if it were surrounded by other images). It’s like flash is creating a spot for the images, just not attaching them…I’ve also tried adding a mouseover listener to see if anything was getting added to their spots, and no, nothing.
I’ve done some tests (changing how many times the loop runs, etc.) and I know that flash recognizes all the images, and the paths are right, it just refuses to show more than one.
Thanks,
Any help would be greatly appreciated.
private function loadThumbs():void
{
trace("loadThumbs Called");
for (c = 0; c < totalPics; c++)
{
thumbRequest = new URLRequest (thumbPathList[c]);
thumbLoader.load(thumbRequest);
trace("thumbRequests: " + thumbRequest);
trace("thumbPathC: " + thumbPathList[c]);
all_thumbs.addChild(thumbLoader);
thumbLoader.x = (xs * xSpacing) + 8 ;
thumbLoader.y = (ys * ySpacing) + 5 ;
xs = xs + 1;
if ( xs == thumbRowCount )
{// if the row has reached the max thumbs per row, then this starts a new row.
xs = 0;
ys = ys + 1;
}
trace("TLX: " + thumbLoader.x);
trace("TLY: " + thumbLoader.y);
}
thumbLoader.addEventListener(MouseEvent.CLICK, loadMainPic );
thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbsLoaded);
}