Button state

Hi, I barely know anything about actionscript and could use help with the following.

I’ve set up this action at the top of my movie in its own layer that extends for my whole movie. If someone changes the variable buttonpress in the movie to a value of 1 I want the sate of my button named “buttsukh” to change to the over state. I’ve labled the frame for the over state “_over” in the button frames. Yet, when buttonpress does = 1 the button state does not change. Can you help?

Actionscript…

if (_root.buttonpress==1)
{
_root.buttsukh.gotoandplay("_over");
}

Thanx for your time.

I don’t think you can target the over state of a button. Instead, make the button a movieclip that has two frames. Frame 1 represents the up state and frame two the over state. Then use

[AS]
if (_root.buttonpress==1)
{
_root.buttsukh.gotoAndStop(2);
}
[/AS]

You’re a genius.