Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

buttons -- keeping the "over" state after click

Status
Not open for further replies.

Curisco

Programmer
Feb 6, 2002
90
SE
Howdy folks,
If some one has asked the same question then i'm sorry i must have missed it.

Here's the thing.
i have six buttons with which all have an "over" state.
when the person clicks the button i would like the over state to ramain "active" while they are on the respected page, (as to confirm which page there on). Then, when on to the next button the rollover effect still works as normal untill of course the persons decides to click releasing the "over" state on the previous button...thus repeating the effect.

The closest i can think of as an example would be in HTML like the "hover" state remaining active after onMouseout.


skip intro and i think hopefully you'll know what i mean.

Once as always, thanks for your time and eventual help.


-------------------------------------
Laughing out loud every day,
keeps the doctor away....gotoAndPlay
-------------------------------------
 
ps
here is exactly what i'm after, but in flash. Ccheck out the buttons (links) and how they behave. ds

thanks again
Mutex

-------------------------------------
Laughing out loud every day,
keeps the doctor away....gotoAndPlay
-------------------------------------
 
ok here is one way. the buttons are not buttons but movie clips (movie clips work as buttons in MX)

2 movie clips with instance names ans a dynamic text field inside...main timeline code

clip1.onRelease = function(){
//what you want it to do
changeText(1);
}

clip2.onRelease = function(){
//what you want it to do
changeText(2);
}


function changeText(x){
switch (x) {
case 1:
clip1.t_field1.textColor = "0000FF";
clip2.t_field2.textColor = "333333";
//3,4,5 etc
break;
case 2:
clip2.t_field2.textColor = "0000FF";
clip1.t_field1.textColor = "333333";
//3,4,5 etc
break;
default:
trace ("no text")
}
}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top