Jump to content
Search Community

set width and height

mickey test
Moderator Tag

Recommended Posts

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

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

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