Suppose I use animated timer on a slide and while the timer is mid-way, I move to another slide and on coming back to the same slide, animated timer starts running from the same place and does not start from beginning even though I have uncheck ‘retain state’ property for animated timer. I have to add ‘stop timer’ and then ‘start timer’ on slide load as a turn around.
I am using individual animated timer like a progress bar on each slide and it is increasing effort multiple time. Is there any better way to achieve this?
Please put the following code in Project Event (Project Properties > Event) to achieve it better:
if (!prez.oldShowSlide) {
prez.oldShowSlide = prez.showSlide;
prez.showSlide = function (data, options) {
var ret = prez.oldShowSlide(data, options);
prez.object('Animated Timer_1').stopTimer();
prez.object('Animated Timer_1').startTimer();
return ret;
}
}
Noted that you should rename your timer object name to match the name in the code. For example, with my code, the timer name should be ‘Animated Timer_1’
Thank you so much again for sharing the code. I tried it and except for one glitch, everything is working exactly as desired.
When I launch this in HTML5 preview, player toolbar has both Play and Pause button visible and overlapping, probably causing the issue. Only after clicking this button once, it starts.
Actually am not going to use the player toolbar and have inbuilt buttons to navigate including a progress bar (that’s how this requirement originated). So with this issue and player toolbar hidden by me, I am not able to move forward.
I tried to look for the issue using F12 debug tool but since I am not technical so could not find out. But there was an error highlighted, screenshot below, if this helps.
I have one more request. I am implementing ‘Show Object’ action on ‘On Load’ event in which I show either of the 2 objects basis condition of ‘apCCVisible’.
Since properties of ‘On Loads’ events cannot be copied across projects, This is humongous task. Could you please help with a java script query which can be applied at project evet level that achieves this above result.
Thanks you so much in advance for all the support.
But I have to apply both the above stopTimer/startTimer and show/hide scripts in the same project. Should I put both the codes one after another as it is or these needs to be merged, as there are many common commands?