Hello,
I have a clock object in script:
Code:
QuizClock = CreateClock("ScriptClock","QuizTimer","[mm]:[ss].[f]");
I then start the timer using the code QuizClock.Start(); When I want to stop the timer I use QuizClock.Stop();
This all works fine once I use QuizClock.Stop() to stop the clock. If the stop command is not used and the page is changed or reloaded I get an error once the page is shown again and the clock continues from where it left off.
Error:
Quote:
Script_Puzzle[105] (19, 0) : Object Not Found : The called object is not a valid object type (undefined? null?)
The error refers to QuizClock.Start(), have tried setting vars = 0, tried using the QuizClock.Start() script on page load but it doesn't recognize this once the clock is already created on a previous page. I am unsure why I am having this problem, I would have thought that code QuizClock = CreateClock("ScriptClock","QuizTimer","[mm]:[ss].[f]"); would have reset all clock related variables anyway.
On Debug.trace the QuizClock is null on second load of page. So the final question which I assume will fix it is how do you reset the clock if it is null? It is not possible to use QuizClock.Stop() if the clock is null. Why would it be appearing as null when the page is loaded twice, but works fine the first time.
Any suggestions?