How to make a text appear with action (on press)

Hello Everybody !

It’s my first post…
I’am french, so I will try to explain my problem as clear as possible.

I want to make a clip which contains a color palett (50 colors) based on 50 buttons (one for each color)
When I click on a button, I want to get a small rectangula fullfilled with the color corresponding to the button selected
AND
in an other area (a rectangula too), I want to get the name of the color selected, for instance “blue”
I find the code to fullfill the first rectangula, but I don’t know what code I must put to obtain the text area completed
Your help will be the very welcome !!! (I am a beginner in AS)
thanks in advance

My first lines of code :

on (press) {
var colorful = new Color("_root.resultat");
colorful.setRGB(0xFF0000);
var colorful = new Color("_root.stickshapes");
colorful.setRGB(0xFF0000);}