Jump to content
Search Community

Using a variable but making it relative

inorganik test
Moderator Tag

Recommended Posts

So, you can do this

 

TweenLite.to(eventItem2, .5, {y:"200", ease:Expo.easeOut});

 

And make "eventItem2" move 200 pixels from wherever it's at. The quotes make it relative. But how do you exchange "200" with a variable and keep the value relative? I am using the tween in a dynamic function that figures the distance on the fly, but I need it to be relative to where it's at, not a coordinate.

 

Thanks!

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