Jump to content
Search Community

Strange pause in tween

khw2010 test
Moderator Tag

Recommended Posts

Below is code which I have written for a banner. There is a rather long pause btwn the bolded red line and the bolded black lines. Thoughts? Thanks in advance!

 

var timeline:TimelineMax = new TimelineMax({repeat:-1});

timeline.append (TweenMax.from(mcTxt1,2,{autoAlpha:0, roundProps:["x"]}) );

timeline.append (TweenMax.from(mcTxt2,2,{autoAlpha:0, roundProps:["x"]}),0.2);

timeline.append (TweenMax.from(mcTxt3,2,{autoAlpha:0, roundProps:["x"]}),0.2);

timeline.append (TweenMax.from(mcTxt4,2,{autoAlpha:0, roundProps:["x"]}) );

timeline.append (TweenLite.to(s1, 4, {autoAlpha:0}) );

 

timeline.appendMultiple ([TweenMax.from(s2, 3,{autoAlpha:0}),TweenMax.from(mcTxt6, 3,{autoAlpha:0}),

TweenMax.from(mcTxt7, 3,{autoAlpha:0})],0);

 

timeline.appendMultiple ([TweenMax.to(s2, 2,{autoAlpha:0}),TweenMax.to(mcTxt1, 2,{autoAlpha:0}),

TweenMax.to(mcTxt2, 2,{autoAlpha:0}),

TweenMax.to(mcTxt3, 2,{autoAlpha:0}),

TweenMax.to(mcTxt4, 2,{autoAlpha:0}),

TweenMax.to(mcTxt6, 2,{autoAlpha:0}),

TweenMax.to(mcTxt7, 2,{autoAlpha:0})], 8);

 

timeline.append (TweenLite.to(s3, 4, {autoAlpha:1}) );

Link to comment
Share on other sites

What's a "long pause" - might it be 4 seconds? That's how long the tween is that you have inbetween those, so that would be expected.

 

I also noticed several other things:

 

1) Why are you using roundProps for "x" when you're not even tweening the x property?

 

2) You could simplify a lot of your code by using the TweenMax.allTo() or allFrom() methods like:

 

var timeline:TimelineMax = new TimelineMax({repeat:-1});
timeline.appendMultiple( TweenMax.allFrom([mcTxt1, mcTxt2, mcTxt3], 2, {autoAlpha:0}, 0.2) );
timeline.append( TweenMax.from(mcTxt4, 2, {autoAlpha:0}) );
timeline.append( TweenLite.to(s1, 4, {autoAlpha:0}) );
timeline.appendMultiple( TweenMax.allFrom([s2, mcTxt6, mcTxt7], 3, {autoAlpha:0}) );
timeline.appendMultiple( TweenMax.allTo([mcTxt1, mcTxt2, mcTxt3, mcTxt4, mcTxt6, mcTxt7], 2, {autoAlpha:0}), 8 );
timeline.append( TweenLite.to(s3, 4, {autoAlpha:1}) );

Link to comment
Share on other sites

Thanks for your response, to answer your q's:

 

1) Why? Well, b/c I'm still learning and usually lift code from a previous project (which used the x prop) that worked. Therefor me and my "noviceness" left it there thinking "if it ain't broke, don't fix it!). Thanks for clarifying.

 

2) And thanks for the advice, still learning flash and tweenmax/lite, so this is helpful

 

Thanks again! KHW

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...