Dynamic links

HI,

Is there a way to dynamicaly generate buttons and set their variables?

For example: I click on one file from a list, some buttons are generated and their actions are set so they each load in a seperate jpeg when clicked. Then when another file is selected these buttons are cleared and some more buttons are generated etc…

*The amount of buttons generated will vary depend on the file clicked.

How can I do this???

Thanks!