Flash and XML photogallery

The tutorial here was well… very interesting and easy to follow. Thanks Kirupa :). But a question comes to my mind. This is because ia m not very good with AS however iam good with coding. I understand the concept of for loops, conditional loops, declaring variables and understanding program syntax. But AS just screws me over a lot of time.

So my question. What if you wanted to make a photo gallery with dates in it. Meaning a fully automated script that will take a thumbnail for a particular date and make it like so that the user can see the data like this

Photo Album [ June 10, 2006 ]
Photo Album [ June 16, 2006 ]
Photo Album [ June 21, 2006 ]

then when they click on it the slidshow under that date starts.

I understand that one way can be by making the xml something like this?

<Even name and date>
-<image url></image url>
-<caption></caption>
-<image url></image url>
-<caption></caption>
</event name and date>
<Even name and date>
-<image url></image url>
-<caption></caption>
-<image url></image url>
-<caption></caption>
</event name and date>

But what really confuses me that how will it generate thumbnails and stuff like that and control their over flow? if all of this is possible then how can i do it?

Help!

Thanks
Craeyon.