I tried this solution but it doesn’t work properly. The timer must be activated at its beginning according to the timeline.
I have a much more complex project with many timers, I added another timer to the sample. If I put the start timer onload, my palyback stops very soon (in wrong - different time at timeline).
@mpluky - well, after struggling a bit myself with trying to use the GUI to solve the problem - I believe my solution would be to utilize JavaScript to develop an event based solution rather than a timeline driven one.
Perhaps with a little greater context of the desire - I might offer another way to tackle the task.
I was viewing the onLoad event as another way to phrase onEnter but it seems that the onLoad actions only wanted to function the first time the slide was loaded rather than on every entry to the slide. Not sure if that is accurate or not but I believe that is what I was experiencing as things would work fine the first time through but would fail on a subsequent attempt since I figured the slide had already been loaded.
I may work on this approach and see if it yields better results.
Hello. No problem, no need to use GUI, javascript would be a good solution.
The only thing I need to be able make a PAUSE Presentation on the timeline with any object on timeline (with attached javascript). Only thing I found and can catch an event from the timeline is a timer.
I have a complex course where is for example 16 timers on slide with various animations and interactions requiring a pause on exact frames in timeline. The course is long, complex and most importantly almost finished. On the end I found out that it is not possible to visit timers slides repeatedly.
What sort of animation are we talking about?
Are the objects on screen meant to display in sequence or can the order vary based on input from the learner?
Are the timers a requirement?
Is there a need to revisit a slide once it is completed?
Of course - it is difficult to tell if this solution will work without additional context but perhaps this will help you. I am sure it will require some tweaking.
I don’t know if you need the little timers to show or if they were just a means to an end for you in the moment. I don’t know if it is required that the timings be different. I didn’t create a visible timer and the timings are now the same. (5s)
Nonetheless - I created a small timer as a function that can be reused when called.
I kept your timeline based layout in mind since you stated that you were mostly done. Hopefully that means minimal rework.
// This code is placed as an onLoad action
// A time-based function that will hide the button
// then play the project for five seconds
// after five seconds it will pause the presentation
// and show the button so that it can play forward
window.myTimer = function() {
prez.object("goBtn").hide();
prez.pause(false);
setTimeout(function() {
prez.pause(true);
prez.object("goBtn").show();
},5000)
}
You could perhaps adapt the timing of your project so that you can adjust the 5000 value (5 seconds) to align with your objects.
The end button simply takes you back to the beginning of the slide.
prez.slideTime(0);
The slide will be in a paused state.
The button to advance again will be visible to start over.
Please note that I named this button “goBtn”
The button simply calls the myTimer function.
myTimer();
Hopefully, this can be adapted to your needs.
I think I kept it as least complicated as I could.
I am also attaching the sample so you can study it.
I see that your project runs a series of animations then pauses; click to continue with the next series of animations; and be able to navigate backward. It might be more suitable and simpler to use a click sequence timeline rather than the main timeline and a series of timers.
For more information about Click Sequence timeline, please refer to this tutorial: How to Work with Click Sequence Timeline in ActivePresenter 9