Button Stays highlighted

How do I create a button that when it’s clicked it stays highlighted? I understand how to make the rollover effect and how to make a MC-Button.

Can someone show me or lead me in the right direction?

Thanks
:whistle:

Best way to do it is with a movieclip… when I was learning flash I wondered how newground had those animated buttons when you roll over’d the button heh

highlighted meaning the 3rd frame of your button? just put a stop(); on the frame…

[edit] sorry didn’t know AS cannot be applied inside a button [/edit]

put this INTO your MC button
and give it some unique name (to each!)

onRelease = function() {
_root.active = _name
}
onEnterFrame = function() {
_root.active == _name ? nextFrame() : prevFrame();
}

Check out the example posted on this thread, they’re pretty basic, but they do the trick. =)

http://www.kirupaforum.com/forums/showthread.php?threadid=28828

Thanks everyone.!!! :slight_smile:

I checked the example on the the threa above, but I still can’t get the button to stay highlighted when clicked.

What am I missing???

Thanks

Post your file so I can see what you’ve done so far.

I am using the fla from the previous thread…

Please help this is driving me crazy

in your mc button use this with frame one as the normal frame and frame 2 as the rollOver frame


onClipEvent(load){pressed=false}
on(rollOver){this.gotoAndStop(2)}
on(press){
pressed=!pressed
if(pressed){this.gotoAndStop(2)}
else if (!pressed){this.gotoAndStop(1)}
}

I must be an idiot. I can’t get it to work.