How can I generate buttons to my XML photo gallery?

Hi!

I have gone through the XML photo gallery tut found here on kirupa.com. But on that tut there are only next and previous buttons. I would like to generate a button for each picture in a gallery. How is this done?? Is there any tuts out there that explaines this? Or can anyone help me out? I would like to have these buttons numbered as well.

I think adding attributes in my XML file is one step to sucsess , but how to generate the buttons in flash??

PLEASEEE HELP ME…