How can I get an SVG animation to reset or start over on Scene Load?

I’m working on an interactive tour project where the visitor will go through a few screens on a tablet to better understand a new service.

The Start Screen has a small intro and then a button to Start. The second screen has an SVG animation that plays for 6 seconds and then stops while the user reads the rest of the content and then moves on to the next screen.

If the tour has been abandoned, I have an onIdle action that has been added which stops the player and goes back to the Start Screen. This works as expected, but when you click the Start button again, the animation doesn’t play, or if I convert it to a looping animation, it’s a random starting point when the Scene gets loaded.

Has anyone successfully been able to replay an SVG animation after reloading a Scene?

I am thinking this will also be necessary for when the tour is over and the user clicks to go back to the Start Screen.

There will also be a few videos that I would like to auto start and I am wondering if this same issue will be present for those.

Thanks
Robb

Please include a file or example.

Hi Max
Here is the file.

Thanks
Robb

resetAnimation.zip (847.8 KB)

On the file, the ‘Next’ button will take you back to the Start Scene. It will also go back after 20 seconds.

xxx.hype.zip (816.6 KB)

i’ve never used vivus instant … with your actual setup it’ll be easiest to (re)set the backgroundimage onsymbolload …

You’ll get full control when NOT using Instant but Vivus’ own API …

Even better: use Hypes abilities!!! This animation really shouts out for building it within HYPE

Hi Hans,
I wasn’t aware there was a different Vivus until just before I saw your response. I found a tutorial on how to insert a Vivus animation from HypeDocks.com and was able to get it to reset as needed when the Start button was clicked.

However, I am very interested in your idea to do this within Hype itself. This is my very first project using Hype (I’ve had it for years but never got around to doing anything until now). And so I would really like to know what would be the best way to do this in Hype. Would it just be adding lines with timed reveals? Or is there a better way to do it?

Thank you for your time!
Robb

https://tumult.com/hype/documentation/#vector-shapes

:slight_smile:

2 Likes

Thank you!