Howto: Loop or Repeat an Animation

For Animation,

In your Head;

Add this counter var,

<script type="text/javascript"> 
	window.loopCounter  = 0;
	  </script>

Then have the timeline Actions call a javascript function

Main timeline starts the animation timeline by calling the function.

the loop timeline starts the animation again by calling the same function.

The function code.

window.loopCounter++;
	
	
	
	if (window.loopCounter <= 3) {
	
	hypeDocument.startTimelineNamed('loop', hypeDocument.kDirectionForward)
	}

We limit the animation to three times.

loop.hype.zip (18.0 KB)

3 Likes