Targeting duplicates II

I attached a movie that I am working on. I use the duplicate actionscript to put several buttons on the stage when clicked. I then want to be able to use the color picker to change the background behind the buttons. As of right now it only works on 1 button and by changing the 6 in this code

for (i=1; i<6; i++)

to 5, 4, 3, 2 or 1 it will only change that button. How can I get them all to change at once?