Need help in category based photo gallery


i am new to flash and i created a flash gallery with the help of below link:
Ever thing is working fine. now i need to add more thumbnails based on the categories.

For example:

In the above tutorial once i click the thumbnail image the bigger image is displaying.

now i need to display some thumbnail based on the categories it should display vertically in left hand side. Once i click the thumbnail corresponding bigger image should be displayed.
i think it should be done based on categories. But i don’t know how to write the xml file
and how to retrive the images based on the categories in my movie.

thank u