Jump to content
GreenSock

heyitsjayy

What would this TweenMax code mean?

Recommended Posts

Hello all,

Please take a look at this, I was wondering basically what it would do since it uses ".x" at the end, and haven't seen used in greensock before:

 

TweenMax.to(slideShow.start, 0, {y:slideShow.second.x});

 

Does this line of Greensock code tween the 'start' MovieClip, to Y, whatever measurement the x point of the 'second' Movieclip equals?

So its basically shifting it down/or up on the Y axis a bit -whatever X equals. (if they are both the same size MovieClips it would esentially just shift it the same length?)

 

OR, does this just shift it the same length Y.. but keeps it aligned with the same value of X. (say x is at 0, then it would shift 'start' MC to the Y of 'second' MC, and maintain the 0 value of X.

Believing this is the right one, though wondering if someone can throw in their 2 cents!

Link to comment
Share on other sites

Hello dude.

 

Your first explanation is right. But I am not sure, if you should use GSAP for just putting an Object to another place. A zero time tween is quite...short :) So if this is a real world example I would probably just set the values like

 

slideShow.start.y = slideShow.second.x;

 

But yes. All in all your are right.

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