Hello everybody,
I’m trying to create a slideshow, along one timeline, starting randomly at the beginning of the scene.
So far I tried this little javascript based on advices I found on this forum. Unfortunately this doesn’t work.
I’m a total beginner in Javascript and would be really thankful for any help.
Cheers, Quentin
var timeInSecondsForJumping = ["0","3", "6", "9", "12", "15", "18", "21", "24", "27", "30"];
var randomTimeInSecondsIndex = Math.floor(Math.random() * timeInSecondsForJumping.length);
var randomTimeInSeconds = timeInSecondsForJumping[randomTimeInSecondsIndex];
hypeDocument.goToTimeInTimelineNamed(randomTimeInSeconds, Timeline principale);
desttime for an timeline will expect integer or float as an argument wether you provided a string.
have to say that this is not clearly stated out in the documentation
var timeInSecondsForJumping = [0,3,6,...];
should work, don't forget to continue the timeline after going to time ...
Hi Hans-Gerd,
thank you for answering my question ! I made the correction but unfortunately this doesn’t seem to work.
For making things easier, I provide an exemple.