PDA

Click to See Complete Forum and Search --> : button = inactive



steiner_99
02-25-2004, 08:31 PM
Does anyone know how to make a button turn inactive once you press it. Then turn active again when you press another button (beides it). like Flashinthecan (http://www.flashinthecan.com)
(top navigation bar)

I really like this technique and I want(*need) to implement it into my personal site Melodicmedia (http://www.melodicmedia.com)
If anyone knows this script please teach! share.

steiner_99
02-25-2004, 11:15 PM
c'mon anybody?

XcVbSdRw
02-25-2004, 11:58 PM
it is easy to do with movieclips as buttons.

1) create a movieclip that has two frames, each with a STOP()

2) in frame 1 put the 'button up' graphic and in frame 2 put the 'button down' graphic

3) drag three instances of the movieclip onto the stage

4) assign them Instance Names of button1, button2 and button3

5) add the following code to the first button
on (release) {
_root.button1.gotoAndStop(2);
_root.button2.gotoAndStop(1);
_root.button3.gotoAndStop(1);
}

6) add the following code to the second button
on (release) {
_root.button1.gotoAndStop(1);
_root.button2.gotoAndStop(2);
_root.button3.gotoAndStop(1);
}

7) add the following code to the third button
on (release) {
_root.button1.gotoAndStop(1);
_root.button2.gotoAndStop(1);
_root.button3.gotoAndStop(2);
}


That's it! You can add buttons easily, change the up/down states, etc.

here is sample code

steiner_99
02-26-2004, 01:12 AM
cool thanks alot, that's very useful to me. Is there a way to do it with buttons already made?


I got this code off of my classmate but never got it working properly.
does this make any senes to you?
I have 6 buttons:




for(x=1; x<=6; x++){
_root[x].enabled = true;
}
this.enabled = false