Jump to content
Search Community

TweenMax help URGENT!

retropunk test
Moderator Tag

Recommended Posts

Hey guys - Sorry for the lame post but I need to turn this redundant code:

timeline.append( new TweenMax(clip1.clip, speedIn, {y:"-130", ease:easeInType}) );

timeline.append( new TweenMax(clip1.clip, speedOut, {y:"130", delay:.6}) );

 

timeline.append( new TweenMax(clip2.clip, speedIn, {y:"-130", ease:easeInType}) );

timeline.append( new TweenMax(clip2.clip, speedOut, {y:"130", delay:.6}) );

 

timeline.append( new TweenMax(clip2.clip, speedIn, {y:"-130", ease:easeInType}) );

timeline.append( new TweenMax(clip2.clip, speedOut, {y:"130", delay:.6}) );

 

etc...

 

into something like this:

var targetClip = ["clip1"].clip; // I know this line is wrong but you see where I'm going?

timeline.append( new TweenMax(targetClip, speedIn, {y:"-130", ease:easeInType}) );

timeline.append( new TweenMax(targetClip, speedOut, {y:"130", delay:.6}) );

 

I have a dozen or so animations happening the way I want but I need to be able to control the targetClip value.

The targetClip value will be constantly changing.

 

Thanks in advance for the help!

- P

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