Jump to content
Search Community

TweenMax: Works well, then not...

MakotoNinja test
Moderator Tag

Recommended Posts

I am making a game in which enemies strut down a path. At each turn in the path I have a movieclip that sets up a tweenMax instance on the enemy clip when the enemy clip makes contact with it. I am using 'shortestRotation' and 'transformAroundPount' on these tweenMax instances and they basically rotate the enemy clip 90 degrees in the appropriate direction. This all works fine and dandy until I go to the 'choose level' screen which basically turns the level container movieclip's visibility to false and the 'choose level' movieclip's visibility to true. Once you select a new level from the chooser, a function nullifies all the arrays and variables populated by the last level and loads the appropriate level into the level container. Now it seems that the Tweens in each subsequent level that is loaded jitter or are jerky at the beginning and end of the tweens.

Here is the code I'm using for each tween instance.

TweenMax.to(baddie, tweenSpeed, {
ease:Linear.easeNone,
useFrames:true,
overwrite:5,
immediateRender:true,
onUpdate:addRotToDistanceTraveled,
onUpdateParams:[baddie, baddie.rotation],
onComplete:resume,
onCompleteParams:[baddie],
shortRotation:{rotation:rot},
transformAroundPoint:{
	point:rPoint,
	scaleX:1,
	scaleY:1
}
});

Link to comment
Share on other sites

It's very tough to troubleshoot general "jittery" performance without seeing your FLA and surrounding code. Are the objects large? Typically, the biggest performance issue by FAR is graphics rendering which has nothing to do with TweenLite/Max performance. Also, do your objects have filters applied? If so, they force cacheAsBitmap to true which forces them to render only on whole pixel values which can lead to them looking like they're "jittery" but again, it has nothing to do with TweenLite/Max. I noticed you're using an onUpdate as well which can be pretty CPU-intensive depending on how optimized your code is inside the onUpdate.

 

If you're still having trouble, please create a sample FLA that demonstrates the issue and post it here. It doesn't need to be your production file(s) - the simpler the better. And don't forget to zip the file(s) first.

Link to comment
Share on other sites

I didn't receive your reply, could you send it again if there is anything in the message I need to read? I am using 11.2, just purchased the "really green" club membership a little while ago. The jitter is very slight but it exists; maybe if you could email me the compiled SWF and so that I can compare the two.

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