Set number of loops


(Mark Hunte) #21

I know you know the answer to that…

symbolInstance_.pauseTimelineNamed('loop')

symbolInstance_.startTimelineNamed('col', hypeDocument.kDirectionForward);
`

(Pete) #22

Kinda ?

if (window[element.id].counter > 15){
	symbolInstance_.pauseTimelineNamed('loop')
	symbolInstance_.startTimelineNamed('col', hypeDocument.kDirectionForward);

(Mark Hunte) #23

Thats it.

:+1:


(Mark Hunte) #24

If you want to avoid code, you can also just have a second timeline that triggers stuff on the 15s frame with a an timeline actions.


(Pete) #25

Yes, true I was aware of that, but this one needs the above the solution. Without going too much into detail, the loop is basically for a propeller of a Drone Mavic 2 Zoom/Pro consisting of just one symbol propeller duplicated for 4x times for 4x sides spinning at rate .1 - .2 seconds in y coordinate giving it a sense of that fast movement? Anyhow, Safari gave me a warning because that propeller animation being in a constant state of loop thereby almost ‘choking the browser’?

Update:
Im toying with different ideas that may or not need the above.

I ended up not going with the above and made a decision to stop the animation for the propeller at a specific point in time by dropping an action in different timelines where it needed to be stopped where it was needed and hide the spinning drone by just using this

 var allSymbolInstances = hypeDocument.getSymbolInstancesByName('Spinner');
 for (var i = 0; i < allSymbolInstances.length; i++) {
 	var symbolInstance = allSymbolInstances[i];
 	symbolInstance.pauseTimelineNamed('Main Timeline', hypeDocument.kDirectionForward);
 }	

heres the result


(Stephen O'Callaghan) #26

This is exactly what I was after! Thank you so much! :grin:


(Stephen O'Callaghan) #27

Was this ever implemented in any updates since March 2015?
Thanks


(Jonathan Deutsch) #28

Specified loop count is not a feature presently; the code above is still the best way to accomplish this.