1 Reply Latest reply on Jun 11, 2008 1:32 PM by ooba

    XML Thumbnail Photo gallery

      Hi, I'm developing an XML thumbnail photo gallery and have everything working out correctly except for the grouping of my thumbnails on the stage. I can only display 9 thumbnail images at a time, and if I have more than 9 in my XML data file I have a problem. What would be the best way to group my thumbnails in sets of 9? How can I set a limit to the display of these thumbnails if say, I have 20 thumbnail images? I was thinking of grouping the information into arrays, but is this the only feasible way to go about it?
      Muchas Gracias!
        • 1. Re: XML Thumbnail Photo gallery
          ooba Level 1
          Array of arrays was the first thing that came to my mind. That way you keep know how many sets you have and how many are in each set.

          You could also create an object and as needed add new objects to it that contains an array of images

          var photoAlbum:Object = new Object();
          // assuming you have 11 images
          photoAlbum.set01 = new Array();
          photoAlbum.set01[0] = 'image01';
          photoAlbum.set01[1] = 'image01'; // etc. until [8]

          photoAlbum.set02 = new Array();
          photoAlbum.set02[0] = 'image09';
          photoAlbum.set02[1] = 'image10';
          photoAlbum.set02[2] = 'image11';