Jump to content


Tween jumping "problem"

Recommended Posts



I believe that the problem is not in Tween engine, but only to check just in case I missed something.

The problem is that I get Tween interuption (I hope that this is the right word :D ), in other words,

tween doesn't run smoothly.


import com.greensock.*;
import com.greensock.easing.*;

var sprite:Sprite=new Sprite();

var g:Graphics=sprite.graphics;
var s:DropShadowFilter=new DropShadowFilter();

var star_commands:Vector. = new Vector.(4, true);

   star_commands[0] = 1;
   star_commands[1] = 2;
   star_commands[2] = 2;
   star_commands[3] = 2;

var star_coord:Vector. = new Vector.(8, true);
   star_coord[0] = 0;
   star_coord[1] = 0;
   star_coord[2] = 250; 
   star_coord[3] = 0; 
   star_coord[4] = 320; 
   star_coord[5] = 350;
   star_coord[6] = 0; 
   star_coord[7] = 350; 

   g.drawPath(star_commands, star_coord);



var timline:TimelineLite=new TimelineLite();
timline.append(TweenLite.to(sprite, 3, {x: 500, y:700}));

Link to comment
Share on other sites

I don't see any obvious problems. If things aren't tweening smoothly, it probably has to do with either your frame rate being too low or (more likely) the graphics you're tweening are too big or complex for Flash to render smoothly. See http://www.greensock.com/tweening-tips/#speed for some performance tips.

Link to comment
Share on other sites

Frame rate is 31, graphic is created only with code I posted, if anyone have time to check (just copy code and test movie in Flash) I will be grateful.

I know that vectors are more "expensible" than bitmaps, I red tweening tips of course :) I just want to check if only I have this "problem".

Link to comment
Share on other sites

Hi Vova,

I tested your code and I didn't have any problems, I ran it at 20 FPS and while it was a little bit juddery, there were no obvious interruptions, I tried it at 31 FPS and that was also fine, so not sure if there is an issue with Flash here, possibly another software/hardware?



Link to comment
Share on other sites

Thanks X10,


juddery or joggle may be a better word to describe the "problem" :).


What I noticed is that, at first test run, tween have some interuption, almost always between about 50% - 80% of tween duration and juddery is constant.

If I run test again (ctrl + Enter), interuption is gone but juddery is still constant.

Maybe the problem is my graphics card. My CPU is Intel Quad Core, but I belive that graphic card (Ati Radeon HD 3850) is not so rubbish (or maybe it is :)).


I tested swf on my wife's laptop :D and the situation is slightly better :shock: -

when I open swf with Firefox, at first run I can notice some small interuption and juddery is still here,

but again, if I do refresh on Firefox, tween is much smoother, I can say that interpution does not exist, and of course - juddery exist.

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.