I am trying to use this specific animation of ScrollMagic
http://janpaepke.github.io/ScrollMagic/examples/advanced/parallax_sections.html
But it's very difficult to load the files properly. I am trying to include ScrollMagic, GSAP and GreenSock, but somehow ScrollMagic asks me to load GASP previously and GSAP says Main Module is missing and asks me to load ScrollMagic before itself. I am doing it async with jQuery as follow
$.getScript( "http://localhost/icons/gsap.js", function( data, textStatus, jqxhr ) {
$.getScript( "http://localhost/icons/scroll.js", function( data, textStatus, jqxhr ) {
$.getScript( "http://localhost/icons/greensock.js", function( data, textStatus, jqxhr ) {
//whatever
});
});
});
It logs me following errors when gsap is first:
ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs ERROR: TweenLite or TweenMax could not be found. Please make sure GSAP is loaded before ScrollMagic or use an asynchronous loader like requirejs.
and this one when scrollmagic is loaded before gasp
ERROR: TweenLite or TweenMax could not be found. Please make sure GSAP is loaded before ScrollMagic or use an asynchronous loader like requirejs.
Did anyone have the same problem before? Do you have a working example to show? How can I fix this loading issues and make an example work?