Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
failure13

quick TweenMax question

Recommended Posts

Hi again! :)

 

For example i got an array called subMenuO, and each of it's item have it's own different y, i wonder if there is a quick way to say TweenMax: "I want you to tween each item from y = 0, right to y where each item is right now".

 

Quick, in my sense means without creating additional / temporary array that would hold y for each item.

 

Thx in advance!

Link to comment
Share on other sites

I think a simple TweenMax.fromAll would sort this out for you, so you could put in y:0 in the parameters. They should then all Tween from the starting of y:0 to their own current y position. I've no doubt Carl will be along to put this in much better terms!!

  • Like 2
Link to comment
Share on other sites

Thank you!

TweenMax.from(subMenuO, 1.5, {y: 0}); have done just what i need!

Link to comment
Share on other sites

Yup, in v12 the target of a TweenLite or TweenMax tween can be an array of objects.

 

 

If you need to stagger the start times you can use TweenMax's staggerFrom() (which replaces allFrom)

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