Answer the question
In order to leave comments, you need to log in
How to play Canvas animation at a certain moment of scrolling?
Hello. There is a Canvas animation made in Adobe Animate CC, when the page loads, the animation plays automatically and when you get to it, you see only the picture with the final result.
How can I make the animation play only when it enters the screen view?
Answer the question
In order to leave comments, you need to log in
This animation has a start function, you need to delay it until the block appears in the scope.
var $animationBlock = $('_selector_to_element');
var $window = $(window);
$window.on('scroll', function(){
if ($animationBlock.offset().top >= $window.scrollTop()){
// animation function
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question