Jump to content
Search Community

TimelineMax not working after loading the animation the second

rj588 test
Moderator Tag

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 am have implemented an animation at  http://hrxbrand.com/ using TimelineMax.
Please find below the code.
 

 timeline = new TimelineMax();

timeline.from($hrithik, 1, {left: -200})
.from($logo, 0.3, {marginTop: 0, autoAlpha: 0}, '+=0.2')
.from($('.home-wrapper-right'), 0.2, {marginTop: 0, autoAlpha: 0}, '+=0.2')
.add('showHeaderFooter')
.from($header, 0.5, {top: -67, autoAlpha: 0}, 'showHeaderFooter')
.from($footer, 0.5, {bottom: -55, autoAlpha: 0}, 'showHeaderFooter');

 

The problem is that the animation gets stuck after loading the site multiple times.

We tried using clear and kill function but its not working.

Kindly help us to resolve the same.

 

Thanks!

 

Link to comment
Share on other sites

Hi

 

Please note, you originally posted in the Flash forums, but I moved this to our HTML5 / JS.

 

I tried looking at your source but there are tons of js files and it seems main is minified. There is a lot going on that really prevents us from going to deep into an investigation.

Most notably, the javascript console gives errors about "undefined is not a function". This can halt javascript execution and may very well be related to the problem.

 

My suggestions:

Hunt down the "undefined" errors and fix them

 

Disable all other 3rd party javascript plugins and test after the removal of each one.

 

If it is not clear that the problem is related to or caused by other js code running please produce a reduced test case with the minimal amount of js / html / css possible necessary to replicate the issue (but do not minify the js)

 

Short of creating a demo for us I would suggest adding a restart button somewhere on the page that controls timeline so we can force it to restart like

 

timeline.restart()

 

Another debug tip would be to add onStart and onComplete callbacks so that we get an idea of when the timeline is starting.. if its being delayed or interupted.

 

These are the types of things we can't do if you only provide your live site to look at.

 

If you build a small codepen demo: http://greensock.com/forums/topic/9002-read-this-first-how-to-create-a-codepen-demo/ that is the best way for us to help.

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