PDA

View Full Version : How to keep a button in "ACTIVE" state



Designophobia
May 23rd, 2008, 12:19 PM
I have built a site in flash with animated nav buttons. I want each button to stay in the ACTIVE state or MOUSEOVER state when the corresponding page is showing.

Here's my code in the actionscript layer:



about_mc.onEnterFrame = function() {
if (mouse_over_about_mc) {
about_mc.nextFrame();
} else {
about_mc.prevFrame();
}
};
samples_mc.onEnterFrame = function() {
if (mouse_over_samples_mc) {
samples_mc.nextFrame();
} else {
samples_mc.prevFrame();
}
};
contact_mc.onEnterFrame = function() {
if (mouse_over_contact_mc) {
contact_mc.nextFrame();
} else {
contact_mc.prevFrame();
}
};



Here's my code for the invisible button overlaying the movie clip:



on (rollOver) {
mouse_over_about_mc = true;
} on (rollOut) {
mouse_over_about_mc = fstartlse;
}



I'm sure it's an easy solution, but I haven't found it yet.

Any help is appreciated!