Jump to content
Search Community

rollover button

SyntaxMind test
Moderator Tag

Recommended Posts

I'm trying to create a roll over menu button that tweens in the navigation once Im in the area but it seems really glitchy at times. Most of the time it works, but sometimes when I rollover the menu area, which has an invisible shape to add more rollover area, the nav buttons show before the full animation finishes. Any help?

 

private function timeline():void
	{
		tl = new TimelineMax( {} );

		// portfolio section
		tl.addLabel("portfolio", tl.duration);

		// about section
		tl.addLabel("about", tl.duration);

		// contact section
		tl.addLabel("contact", tl.duration);

		tl.tweenTo("portfolio");


		//menuOver
		tl.addLabel("menuOver", tl.duration);
		tl.append( TweenMax.to( menuBtn, 1, {y:770, ease:Back.easeOut}) );
		tl.append( TweenMax.to( portfolioBtn, 1, {y:739, ease:Back.easeOut}), -.7 );
		tl.append( TweenMax.to( aboutBtn, 1, {y:739, ease:Back.easeOut}), -.7 );
		tl.append( TweenMax.to( contactBtn, 1, {y:739, ease:Back.easeOut, onComplete:tl.pause}), -.7 );


		//menuOut
		tl.addLabel("menuOut", tl.duration);
		tl.append( TweenMax.to( portfolioBtn, 1, {y:770, ease:Back.easeOut}) );
		tl.append( TweenMax.to( aboutBtn, 1, {y:770, ease:Back.easeOut}), -.9 );
		tl.append( TweenMax.to( contactBtn, 1, {y:770, ease:Back.easeOut}), -.9 );
		tl.append( TweenMax.to( menuBtn, 1, {y:739, ease:Back.easeOut, onComplete:tl.pause }), -.9 ) ;

	}

Link to comment
Share on other sites

You didn't include any of your mouseOver/mouseOut handlers so it's very difficult to troubleshoot. I also didn't understand why you're adding a bunch of labels at the same spot and I don't know why you're putting all your tweens into a single TimelineMax instance. Why not just create a fresh set of tweens on each rollover/out? If you're still having trouble, please post a very simple FLA that demonstrates the issue so that we can publish it on our end and see exactly what's going on.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...