Jump to content
Search Community

translating and rotating with different eases

BladePoint test
Moderator Tag

Recommended Posts

I currently have a sprite that is being translated and rotated:

TweenMax.to(mySprite,1,{transformMatrix:{x:100,rotation:-45,ease:Linear.easeNone}});

 

I want the translation part to use Linear.easeNone and the rotation part to use Cubic.easeOut. If I try to break it up into two different lines, the first line gets ignored:

 

TweenMax.to(CSbinder,.5,{transformMatrix:{x:39.4,ease:Linear.easeNone}});
TweenMax.to(CSbinder,.5,{transformMatrix:{rotation:-45,ease:Cubic.easeOut}});
 
Does anyone know how I can do this? Thanks.
Link to comment
Share on other sites

Yeah, the problem is that the transform.matrix is a single value so if you have 2 different tweens that are attempting to change that one single property at the same time, one must win. My recommendation is to just tween regular x, y, and rotation values of the DisplayObject instead. 

  • Like 1
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...