Do I need to write an if/else statement for my button color to change on/off when it is active?
Right now I have it set to tween from gray to red, my issue is getting it to go back to gray when another navigation button is clicked. I can do functions for each button, but there has to be a better way to set this up, I was thinking a conditional statement, but I am not very advanced with ActionScript, but I insist on doing things the right way....
Here is a bit of my code, and comments are greatly appreciated!
The gray color it needs to tween back to is #6D6E71 (or 0x6D6E71)
import com.greensock.*;
import com.greensock.easing.*;
this.why_mc.nav_titles_txt.text = "WHY IDS";
this.who_mc.nav_titles_txt.text = "WHO WE ARE";
this.loc_mc.nav_titles_txt.text = "LOCATIONS";
this.our_mc.nav_titles_txt.text = "OUR PARTNERS";
this.hom_mc.nav_titles_txt.text = "HOME";
TweenPlugin.activate([TintPlugin]);
why_mc.onRelease = function() {
gotoAndPlay("whySection");
TweenLite.to(whyText_mc, 1, {_x:315.95, _y:60.95, ease:Circ.easeOut});
TweenLite.to(why_mc.nav_titles_txt, 1, {tint:0xFF0000 })
};
who_mc.onRelease = function() {
gotoAndPlay("whoSection");
TweenLite.to(whoText_mc, 1, {_x:315.95, _y:60.95, ease:Circ.easeOut});
TweenLite.to(who_mc.nav_titles_txt, 1, {tint:0xFF0000 })
};
loc_mc.onRelease = function() {
gotoAndPlay("locSection");
TweenLite.to(locText_mc, 1, {_x:315.95, _y:60.95, ease:Circ.easeOut});
TweenLite.to(loc_mc.nav_titles_txt, 1, {tint:0xFF0000 })
};
our_mc.onRelease = function() {
gotoAndPlay("ourSection");
TweenLite.to(log_mc, 1, {_x:350.40, _y:69.95, ease:Circ.easeOut});
TweenLite.to(our_mc.nav_titles_txt, 1, {tint:0xFF0000 })
};
hom_mc.onRelease = function() {
gotoAndStop("homeSection");
TweenLite.to(hom_mc.nav_titles_txt, 1, {tint:0xFF0000 })
fadeIn();
fadeInB();
};