How to make the button's colour stay the same after being clicked?
Hi.
I want to create button which the colour will change when user click to indicate that the button has been chosen.
I've found solution through the previous discussion in this forum.
I've tried but the something lack.
When I click the button, the colour change when I remove my mouse cursor. Then when I roll over my cursor over the button, the first colour will appear. Again, if I remove the cursor, the colour change to the second colour I've set.
Here is the actionscript I've been using (Adobe Flash Professional CS6, ActionScript 3.0) ;
stop();
hello.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene);
function fl_ClickToGoToScene(event:MouseEvent):void
{
hello.upState = hello.downState;
// to make the button appear to stay down when released
hello.upState = hello.hitTestState;
// to reset it, assuming the Hit frame holds the upSate imagery
//MovieClip(this.root).gotoAndPlay(1, "Scene 2");
}
Hope anyone can help me. Thank you in advance ![]()