Unable Rewind Sync Events
August 15, 2016 12:00 AM
Situation: I have an audio file (with no display/controller) that has various sync events (show/hide graphics, text, etc). Next buttons have been disabled until the audio has finished playing. I have a Pause/Play button which stops the audio and events and works great. I would like to have a Rewind button that sets both the audio and the sync events back to the beginning.
So far, I have tried the following:
Option 1: Actions on the rewind button Stop and then Play (which rewinds the audio). Results: I can get the audio back to the beginning but the sync events will not reset.
Option 2: Action on the Rewind button Stops the audio and then a second action Go to Current Page. Results: I can get the audio back to the beginning but the audio does not auto play and the sync events will not reset.
Neither of these options truly reload the audio file/page. I did come up with a few workarounds, but none are very elegant.
Workaround 1: Add a blank page in between each page. Action on the Rewind stops the audio and then Go to In Between page (which has an on show, go to next page action). When you get back to the page you want (screen flashes briefly), everything runs fine.
Workaround 2: Have a second version of the audio file (with same sync events). Action on the Rewind button hides the graphics (I have them in a group), Stops the current audio, and then Play the second version of the audio. Again, all events work OK. Of course, this means you can only rewind once.
Workaround 3: Advise the students if they want to rewind, they will need to Go Back and then Next. To allow the Next button on the previous page to appear immediately, there is an action on the page On Show, Show next If This Page is Completed.
Any other suggestions?
Will an upcoming version of Lectora allow a proper reset?
Discussion (4)
What about adding the sync actions in reverse to the button, therefore, sending everything back to its original state on page reload to option 1?
Hi,
if you stop and replay the audio all events are run again (no need for a second audio object), only if an object has been shown already, the "Show" action from the event will have no effect. The event does not hide the object, "initially invisible" is a property of the object.
I agree with Jennifer, the best way is to make the Stop / Replay button reset the actions by adding actions doing the opposite of all events. You could add an event to "Run action group" that contains all these actions at 0:00:01.
Your Option 2: "Go to current page" is made for scrolling on the same page, it won't reload the page.
Your Workaround 1: This can be used for your purpose, but you'd only need one blank page somewhere at the end of your title. Make the button go to that page and add an action to that page:
On: Show
Action: Go to
Target: Last visited page
The action will always bring the user back where he came from.
Your Workaround 2: Not useful for your purpose. An object that has been shown will not be hidden by the same events in that second audio (unless you add an event hiding it).
Your Workaround 3: Well, can be done for your purpose, but it would be better to keep this solution for issues that couldn't be solved elsewise.
Tim
I escalated the improvement of adding a "reset" button, action, or variable that would reset the sync events . I also chatted with our support team and they suggest Workaround 1 or liked my suggestion of option 1 with reverse actions. Workaround 1 should be the quickest in terms of development.
Thank you everyone for your suggestions.
I ended up using 3 actions on the button. One to return all graphics and text boxes to initially hidden, the second to stop the audio, and the third to start the audio. I added a slight delay between all actions. In addition, it only worked in Preview in Browser (F9) mode or once I published it. It does not work in Run (F10) or Preview (F11) modes.
Discussions have been disabled for this post