Event handler change button color for a state?

I am trying to figure out a way for an action script to change the background color of a particular button state.

I have a puzzle graphic. As the mouse moves over the pieces of the puzzle, the colors change. When the mouse clicks on the puzzle piece I want them to permanently change. However, I cannot figure out how to access the bgcolor property of a button state object, such as the up state.

Any help woul dbe appreciated.

to change colour programatically, you’ll want to create a Color object that controls the object in question.

say the movie you wanted to change was called “bg”

bgcolour = new Color(bg);
bgcolour.setRGB(0x349f0d);

And it HAS to be a movie clip. You can’t tell target buttons.

I’d say that you’re buttons should be invisible, and you should recreate the buttons that you have as movie clips.

I am having a problem referencing the object for the movie clip. I drew a shape and made two symbols out of it:

b1 : a button symbol
mc1: a movie clip symbol

I then made an instance of b1 and made it transparent. I then made an instance of mc1. However, I cannot name an instance so how do I go about referencing the instance of mc1 in order to create a color object? The only referennce I can see is _root.

Ah, I’m a moron. I failed to notice that in the instance panel for the movie clip it clearly has a name field. The transparent button with associated movie clip is perfect. Muchas gracias.