Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
azuki

How to smooth the motion of a single tween?

Recommended Posts

Hi,

 

I'm tweening a semi-large simple vector across the stage and it's appearing "jerky" in the motion. The tween is part of a timeline but I doubt that's the problem. Any tips on how to make this smoother?

 

Basically, it's a large rectangle, moving from x:-1200 to x:0. It definitely moves but its not the smoothest entrance around...

 

buildTimeline.append(new TweenLite(bar, .8, {x:0, ease:Sine.easeIn}));
buildTimeline.append(new TweenLite(contentBox, .4, {alpha:1,ease:Sine.easeOut}));
buildTimeline.append(new TweenLite(subNav, .4, {alpha:1,ease:Sine.easeOut}));

 

 

**Sorry, I wanted to add something else funky going on. Although this is in an appended timeline, the other tweens are starting before the first "bar" has reached its final position. Do I have to set a delay on the 2nd and 3rd tweens? I thought this was one of the benefits of TimelineLite?

 

 

thanks for any thoughts!

Link to comment
Share on other sites

as for the jerkiness of the tween. 1200 pixels is quite a far distance to cover in only a fraction of a second. depending on your framerate there may not be a whole lot of opportunities for the item to render.

unfortunately Flash doesn't handle moving large objects very well to boot. TweenLite isn't the issue here for sure. if it is just a basic rectangle cacheAsBitmap may speed things up.

 

as for your timeline issue, the way you have it set up you should not need to manually add a delay. the tweens should play in succession one after the other. is there anything else in your code that is tweening those objects or effecting buildTimeline?

 

can you post an fla that only exhibits this behavior?

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