Duplicate buttons(mc) and change names

hey! ok im trying to write a script i have a php file that send two variables one with names of image files and the other with the total number of images in a folder…

in flash im trying to make a button for each image… how do i do that… i kinda figured out the duplicate movieclip part…

but how do i rename each button so that it will be like

buttton1 for first image
button 2 for second image

how do i add a variable to the end of the name of the button?

and secondly the names of the images and the widht and hight of the images are all in a array matrix…

im using while(i<= imgfilearry_num)

how do segregate the data from the array

I hope my question makes sense i know its kinda complicated but ive been trying for 2 days now and i cant seem to figure it out :frowning: