Restart/Reload Animation From The Very Beginning


(Quint Rahaman) #1

I have five scenes. On the last scene, I have a button whose purpose is to restart the animation from the very beginning; that is, at scene 1. I added an action to the button: Jump to Scene > Scene 1

An error results when clicking the button:

Uncaught TypeError: Cannot read property ‘U’ of undefined

What do I have to do to allow the user to restart the animation?

Thank you,

Quint


(Mark Hunte) #2

That is normally enough unless what you are doing in between scenes is changing something like a var in the windows scope that holds a value or object now not around any more

An example of what you are doing may get a better answer than an outright guess…


(Quint Rahaman) #3

Thanks for replying, Mark. The document is confidential unfortunately. Effectively, it has to behave as though the user clicked the browser’s refresh button that would reload the entire document. So, yes there are files and functions that have to be loaded. Is that a sufficient explanation?


(Quint Rahaman) #4

Mark,

I figured it out: document.location.reload(true);

Thanks for your help.


(Mark Hunte) #5

Cool,

Going to scene will normally restart any animations on the Main timeline. It is not a classic reload. Just a scene change