Search the Community
Showing results for tags 'rotator'.
-
I made this sweet rotator that I can put as many images into as I could ever want, but I am trying to add forward and back buttons. It's not going well. I tried this code for the forward button but I can't seem to figure out how to add a 30 second pause before restarting the animation. rightBtn.click(function(e) { console.log( slideAnimating ); var btnIndex = rightBtn.index(this); if(!slideAnimating && btnIndex !== slideNumber) { timerFunction.pause(); nextSlide = btnIndex; changeSlide(); } }); Then the left button I want to play the animation in reverse to get the last image that was designated currentSlide and nextSlide to move backwards, wait 30 seconds then go back to the normal flow. Any help would be greatly appreciated.
-
I am trying to build my own custom rotator, but I am having a problem with interrupting the current animation, then going to a specific one to play from there. I made a click function that plays from the desired spots, but I have tried several ways to interrupt the current animation. disc01.onclick = TweenMax.killAll(); animate_rot01; disc02.onclick = TweenMax.killAll(); animate_rot02; disc03.onclick = TweenMax.killAll(); animate_rot03; disc04.onclick = TweenMax.killAll(); animate_rot04; disc05.onclick = TweenMax.killAll(); animate_rot05; Here is the link to my codepen http://cdpn.io/IKvah If I take out the killAll it plays through fine, but when I add it, it seems to fire before I click anything. Any help would be awesome. After I figure out how to kill the animation I want to have the click ignore the delay.