Jump to content
Search Community

scottbrasher

Members
  • Posts

    6
  • Joined

  • Last visited

scottbrasher's Achievements

0

Reputation

  1. var currentButton:MovieClip; function activate(btn){ //de-activate currentButton if there is one if(currentButton){ TweenLite.to(currentButton.nav_titles_txt, .5, {tint:0x6D6E71}) } //activate the button that was clicked TweenLite.to(btn.nav_titles_txt, .5, {tint:0xFF0000}); currentButton = btn; }
  2. Whats the best way to target the text as I have setup the nav button in a somewhat dynamic way. this.hom_mc.nav_titles_txt.text = "HOME"; Is this possible to change the text only or should I set them up differently?
  3. 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(); };
  4. Very simple question here, how do I make my timeline repeat after the last tween? here is my AS2 code: import com.greensock.*; import com.greensock.easing.*; var timeline:TimelineLite = new TimelineLite(); timeline.append( new TweenLite(img_mc, 1, {_x:"0", _y:"0", ease:Circ.easeOut}) ); timeline.append( new TweenLite(img_mc, 1, {_x:"462", _y:"0", delay:5, overwrite:false, ease:Quart.easeOut}) ); timeline.append( new TweenLite(img_mc, 1, {_x:"462",_y:"0", delay:5, overwrite:false, ease:Quart.easeOut}) ); timeline.append( new TweenLite(img_mc, 1, {_x:"462", _y:"0",delay:5, overwrite:false, ease:Quart.easeOut}) ); timeline.append( new TweenLite(img_mc, 1, {_x:"462", _y:"0",delay:5, overwrite:false, ease:Quart.easeOut}) );
×
×
  • Create New...