Jump to content
Search Community

append question

timaging test
Moderator Tag

Recommended Posts

Hi,

 

I have a list of 6 items in a timeline. I want them to actually come in pairs, so the shadow matches the item. I tried adding a negative value to the end, but they never matched. Is there a way to add to this:

yourtimeline.append(new TweenLite(icon01b, 1, {y:38, motionBlur:true, alpha:1, ease:Elastic.easeOut}));
yourtimeline.append(new TweenLite(iconShadow01, 1, {y:150, motionBlur:true, alpha:.4, ease:Elastic.easeOut}));
yourtimeline.append(new TweenLite(icon02b, 1, {y:6, motionBlur:true, alpha:1, ease:Elastic.easeOut}));
yourtimeline.append(new TweenLite(iconShadow02, 1, {y:150, motionBlur:true, alpha:.4, ease:Elastic.easeOut}));
yourtimeline.append(new TweenLite(icon03b, 1, {y:24, motionBlur:true, alpha:1, ease:Elastic.easeOut}));
yourtimeline.append(new TweenLite(iconShadow03, 1, {y:150, motionBlur:true, alpha:.4, ease:Elastic.easeOut}));

 

thanks,

Dave

Link to comment
Share on other sites

Sure, there are several options:

 

1) Just use appendMultiple().

 

yourtimeline.appendMultiple( [new TweenLite(icon01b, 1, {y:38, motionBlur:true, alpha:1, ease:Elastic.easeOut}), new TweenLite(iconShadow01, 1, {y:150, motionBlur:true, alpha:.4, ease:Elastic.easeOut})] );
yourtimeline.appendMultiple( [new TweenLite(icon02b, 1, {y:6, motionBlur:true, alpha:1, ease:Elastic.easeOut}), new TweenLite(iconShadow02, 1, {y:150, motionBlur:true, alpha:.4, ease:Elastic.easeOut})] );
yourtimeline.appendMultiple( [new TweenLite(icon03b, 1, {y:24, motionBlur:true, alpha:1, ease:Elastic.easeOut}), new TweenLite(iconShadow03, 1, {y:150, motionBlur:true, alpha:.4, ease:Elastic.easeOut})] );

 

-or-

 

2) Use a negative offset value in every other append() like:

 

yourtimeline.append(new TweenLite(icon01b, 1, {y:38, motionBlur:true, alpha:1, ease:Elastic.easeOut}));
yourtimeline.append(new TweenLite(iconShadow01, 1, {y:150, motionBlur:true, alpha:.4, ease:Elastic.easeOut}), -1);
yourtimeline.append(new TweenLite(icon02b, 1, {y:6, motionBlur:true, alpha:1, ease:Elastic.easeOut}));
yourtimeline.append(new TweenLite(iconShadow02, 1, {y:150, motionBlur:true, alpha:.4, ease:Elastic.easeOut}), -1);
yourtimeline.append(new TweenLite(icon03b, 1, {y:24, motionBlur:true, alpha:1, ease:Elastic.easeOut}));
yourtimeline.append(new TweenLite(iconShadow03, 1, {y:150, motionBlur:true, alpha:.4, ease:Elastic.easeOut}), -1);

Link to comment
Share on other sites

awesome-thanks! I did actually end up figuring out the second one... I thought that might be the long way around, and there was some special feature that I didn't know about.

 

I guess the good part is that I'm kinda getting the hang of this now!

 

Dave

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