Action Scripting needed

I have a project I’m doing and I can’t seems to figure out the coding that is needed to make part of it work. The project is a character simulator. I hope to make this clear enough.

The problem is I have several thumbnails on my stage and when you click on a certain image another image will pop up on the other side of the stage in a certain spot. What I want is to have it where you can click these buttons and have the image come up while at the same time have another group of buttons that change the image according to the image that was originally pressed.

Another example is I have buttons that will bring up a hair style and there are around 20 of these buttons. What I want to do is set up another group of buttons that will change the color of the hair (change the image to the color hair image.) I don’t know how to make the code recognize the image of the hair pressed and the change color hair image at the same time.

An example is on this page…
There is a head hair change with also a hair color changer.

If someone can help that would be most helpful.