Jump to content
Search Community

hormigaz22

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by hormigaz22

  1. @mikel!! I've tested it on my environment and works perfectly!! Thank you very much! From now on... destroy! destroy! destroy!!! Thanks again
  2. Hi Zach! Here is the demo reduced to the minimum configuration that I have been able to do: CodePen JS code explanation: function calculateCarruselDimensions() --> Function that loops through each .carrusel_item to get its width and know how many pixels should I scroll to the right/left to pass to the tween. function doneResizing() --> Function that rerun the calculations of getting each .carrusel_item width. That function only is triggered when window resize is finished. var horizontalSlide --> variable that contains TimelineMax var controller --> variable that contains ScrollMagic Controller I've posted the same question on StackOverflow, but no one have answered. I'm all alone in this world!! ? I hope you can help me. If not, don't worry Thanks a lot!!
  3. ZachSaucier, I've tried to kill the animation and start it again, but that didn't worked to me. I have declared in the global scope the variable named 'horizontalSlide' like that: var horizontalSlide = new TimelineMax(); Then when page is loaded: $(window).on('load', function() { horizontalSlide.fromTo("#slideContainer", 10, { x: "0" }, { x: amount_to_scroll * (-1) + 'px', ease: Linear.easeNone, }); }); And then, when page resizes: horizontalSlide.kill(); //TimelineMax.killTweensOf("#slideContainer"); horizontalSlide.fromTo("#slideContainer", 10, { x: "0" }, { x: amount_to_scroll * (-1) + 'px', ease: Linear.easeNone, }); That code does not work Please, can you help me? How can I kill and start over the animation when window is resized? THANKS!
  4. Hello ZachSaucier! The thing about using ScrollMagic and GSAP is to achieve the scroll effect that you see when you scroll down... even scrolling down, there is a moment when you are scrolling left/right but doing it while are scrolling/touching up/down... Have I explained myself well? Yes, resizing breaks functionality, do you know how to update value of variables when resizing? Thanks!!
  5. Hi! Newbie here... Sorry I'm developing some horizontal scroll with TimelineMax and ScrollMagic... When page loads first time, that's all going good, but when I resize window or change from landscape to portrait in mobile devices, scroll stops working properly. I do not how to access the previously created TimelineMax.fromTo when I am on $(window).on('resize') event... I've looked around, internet, forums, ... and I didn't find the solution. I've attactched Codepen URL where you can see what I've done so far... Please, load URL see initial scroll behaviour, and then resize vertically and horizontally and you will see how the scroll is not showing all images or shows a blank space to the right of the last image. Anyone can show me the way, please? Thanks in advance!
×
×
  • Create New...