Jump to content
GreenSock

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

Synchronising audio/video with animation and scrub bars

Go to solution Solved by Dipscom,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi 

 

I recently joined and have read some very helpful posts and have got an audio file playing in synchronization with a timeline. What I need specifically is audio with a scrub bar being synchronized with a series of animations which have their own scrub bar.

 

In the code I have put together I have the audio playing and the animations running for the duration of the sound file and I have a scrub bar for the audio and animation which are synchronized together.

 

The problem I have is that the animations are not moving smoothly but are shaking back and forth. I think this is to do with the rate at which they are being updated and I believe things can be improved by using the TweenLite.ticker or the TweenMax.ticker but I am not sure of the best way to implement them.

 

Can you help me to smooth out the movement of these animations. The codepen is here: 

 

Many Thanks

 

Pebble

See the Pen GjWJKA by anon (@anon) on CodePen

Link to comment
Share on other sites

Hi 

 

I have implemented the ticker which has now smoothed out the animation but now it is finishing a little early. Not sure on why that is happening. Can you help?

 

Here is the codepen: 

See the Pen ALqEGY by anon (@anon) on CodePen

 

Many Thanks

 

Pebble

Link to comment
Share on other sites

  • Solution

Hi Pebble,

 

Welcome to the forums! 

 

That's a really nice start and setup. The codePen really helps, thanks for that.

 

You actually got it all going. Your only slip was overdoing it a tad.

 

You created a timeline, added the test animation and hooked it up correctly. But then, you added half of the timeline inside another variable and tweened that with the tick. All you had to do was to tween the whole timeline with your Update function.

 

See the Pen rryZaQ?editors=0010 by dipscom (@dipscom) on CodePen

. I think this is what you were looking for.

  • Like 4
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.
×