mickey Posted May 30, 2011 Share Posted May 30, 2011 hello i am trying to set the width and height of an object at the same time it is beging tweened to another location i am using this, but i am getting errors TweenMax.to (a13, 1.5, {x:88.15, y:264.3, ease:Bounce.easeOut}, {setSize: {width:520.30, height:119}}); has any one done someting similar to this? please help thanks for reading Link to comment Share on other sites More sharing options...
Carl Posted May 30, 2011 Share Posted May 30, 2011 i am not familiar with setSize {width:520.30, height:119} if you want to tween the width and height while the position is changing just do: TweenMax.to (a13, 1.5, {x:88.15, y:264.3, width:520.30, height:119, ease:Bounce.easeOut}); if you want to tween the width and height at a different rate/speed just use 2 tweens: TweenMax.to (a13, 1.5, {x:88.15, y:264.3, ease:Bounce.easeOut}); TweenMax.to (a13, .2, {width:520.30, height:119}); if you want to set the new size immediately just do: a13.width = 520.30 a13.height = 119 TweenMax.to (a13, 1.5, {x:88.15, y:264.3, ease:Bounce.easeOut}); Link to comment Share on other sites More sharing options...
mickey Posted May 30, 2011 Author Share Posted May 30, 2011 perfect, could not have asked for a better reply sorry to bug u with this, wat if i want to add some rotation while the rescaling and repositioning are taking place Link to comment Share on other sites More sharing options...
Carl Posted May 30, 2011 Share Posted May 30, 2011 you can add as many properties as you wish to the vars object TweenMax.to (a13, 1.5, {x:88.15, y:264.3, width:520.30, height:119, rotation:180, ease:Bounce.easeOut}); to learn more please read: http://www.greensock.com/get-started-tweening/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now