Jump to content
Search Community

Silly question about TweenMax.allFromTo

retropunk test
Moderator Tag

Recommended Posts

Hey guys, I was wondering if I could do something like this:

 

TweenMax.allFromTo(contentArray, .3, {alpha:0, x:0}, {alpha:1, x:[0, 20, 50]}, 0.2);

 

Where the x value in the "from" vars would be 0 and the "to" vars would be an array of positions?

 

Now I know that this code doesn't work but my question is can I get that to work another way?

Normally I would use a for loop and loop through the array using TweenLite.

 

But I was just messing around with allFromTo and it seems so close! :)

 

Thanks

- Patrick

Link to comment
Share on other sites

Hi Patrick,

 

do you want each item to tween to x:0, x:20 and then x:50? that would be just a straight line.

or do the values in the array signify unique ending values for each object in the array?

 

I'm just trying to understand better what the end goal is.

 

if its the latter, you are going to need unique tweens for each object and a loop is the best way to go (that i can think of).

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