Jump to content
Search Community

How to change other properties while animating

aleangelico test
Moderator Tag

Go to solution Solved by Shaun Gorneau,

Recommended Posts

Hi

 

I want to move an object during 6 seconds, and make changes to some properties (like opacity and rotation) while moving.

In this code I used "-=2", etc, expecting to trigger the change 2 seconds before the first 6 seconds finishes, but it starts after the first animation finishes.

Is this possible? to have a "background" animation and make changes during it?

 

 

See the Pen oNopyEa by aleangelico (@aleangelico) on CodePen

Link to comment
Share on other sites

Hey @aleangelico,

 

Welcome to the GREENSOCK Forum.

 

1 hour ago, aleangelico said:

expecting to trigger the change 2 seconds before the first 6 seconds finishes, but it starts after the first animation finishes.

 

The interaction of time, duration and ease is relevant here.

Here is a small example:

 

See the Pen gOXodJQ??editors=1010 by mikeK (@mikeK) on CodePen

 

Happy tweening ...

Mikel

 

 

  • Like 2
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...